Java utility skills uploading files, etc.

Source: Internet
Author: User
Tags base64 ftp file http post

1.IOS AES symmetric encryption, encryption results are different, problem solving

IOS HTTP POST request, using the Afnetworing framework, the default request Content-type is Application/json, so the value cannot be obtained using @requestparam or Request.getparameter

When you change Content-type to Applicaion/x-www-... After the body is used @requestparam or request.getparameter still gets the parameter

The result of the decryption, the result of the encoding, the server may have all uppercase letters, and the result of the app side is lowercase, resulting in the signature, the encryption string is incorrect

using the spring @Service annotations, when using service name calls elsewhere, it is not possible to match, because when the name of the class begins with two or more uppercase letters, The bean's name will be consistent with the class name, otherwise only the first letter becomes lowercase http://www.cnblogs.com/kevin-yuan/p/5437140.html

through reflection, how to get the parameter name of the method, parameter type, etc. http://blog.csdn.net/liuxiao723846/article/details/47253751 app limits the number of login terminals for the same user

Because the same account can be logged in at different terminals at the same time, so that the concurrent update when the skip judgment, the concurrent paging query, query to the data duplication problem

Request parameter question:

1. + Variable Space

2. Android side use frame base64 after the strange "\ n" or "\ r"

Reason: With the Base64 algorithm encryption, when the string is too long (generally more than 76) will automatically add a line break in the middle, the original "carriage return line (\ r \ n)" is in Windows, and Linux is only a newline (\ n), Mac only enter (\ r).

Workaround: Direct substitution in Java, string object. ReplaceAll ("\r|\n", "" "); Android with Android.util.Base64.encodeToString encryption, more than one android.util.Base64.NO_WRAP can solve the problem

With the URL encoding table, this article Base64 encoded table error, do not follow it

Http://www.cnblogs.com/kobe8/p/4030396.html

Base64 Encoded article: http://blog.csdn.net/bian1029/article/details/51406864

2.oracle Table Creation Issues

Have encountered this problem before, forget, record again

When the table is built, the table name is lowercase, but after it is created, the query Delete prompt table does not exist, and then double quotation marks are OK.

When the table is built, the lowercase table names are raised with double quotes, and Oracle is case-sensitive under double quotation marks. The best time to build a table is to remove the double quotes.

3.App Streaming paging service end design

Previous Web segments page through PageNo and pagesize, not append content, but the app is all about appending, so you can't use the previous pagination method

http://www.jianshu.com/p/13941129c826

http://www.scienjus.com/app-server-paging/

4. Diagram Tool:

Http://www.cutterman.cn/zh/cutterman

5 . App Implementation PDF Reader, program research

http://blog.csdn.net/asce1885/article/details/52878066

6.ftp file upload and download

http://blog.csdn.net/hbcui1984/article/details/2720204

7.Springmvc upload file

Http://www.cnblogs.com/fjsnail/p/3491033.html

https://yq.aliyun.com/articles/38971

8. Three ways to upload multiple files:

1. List Collection

2. Map Collection

3. In the form of a single file: Imagefile1,imagefile2,imagefile3;

Reference: http://blog.csdn.net/a1314517love/article/details/24183273

Android Multi-file: http://blog.csdn.net/yyongchao/article/details/52481998

Because iOS uses afnetworking, it is not possible to get to the file in debugging, later found the upload of the time map mode, later communicated after the iOS developer said, only support map this way,

9.java send post, Get tool class and principle

http://lavasoft.blog.51cto.com/62575/175911/

http://blog.csdn.net/jiazimo/article/details/6365130

Add parameters to the HTTP header, parameter names include underscores, but are automatically filtered out when Nginx is passed

Reason:

The Nginx proxy defaults to the "_" underline of the parameters of the header, so it is not available after deployment.

Solve:

1, in the header do not use "_" underline, you can use the name of the hump or other symbols instead, the general use of "-"

2, in the Nginx nginx.conf file configuration http part of the add: Underscores_in_headers on; (default is OFF)

File upload, upload from one server to another server

Using sftp:http://blog.csdn.net/haidage/article/details/6859716

Android Version Update interface description

Http://dev.xiaomi.com/doc/p=62/index.html

Google has defined two properties for the APK: Versioncode and Versionname, they have different uses.

Himalaya FM

Reprint: Do a new product demand, experience the analysis of documents? (Example: Himalaya FM)

Http://www.cnblogs.com/wenying/p/6549008.html

http://blog.csdn.net/foruok/article/details/60552387

HTTPS detailed

http://blog.jobbole.com/86660/

Http://www.cnblogs.com/zxj015/p/6530766.html

nginx Add SSL support-compile-time parameter detail list
    ./configure \        --with-http_ssl_module \ Make            && make install  

http://blog.csdn.net/pang040328/article/details/29180913

Nginx + Tomcat Configuration SSL support, no need to configure SSL support in Tomcat

http://www.oschina.net/question/12_213459

Tomcat Configuration supports SSL:

https://my.oschina.net/chaon/blog/717902

Java utility skills uploading files, etc.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.