AES Requires Limiting SEED Length

I wrote a utility class to encrypt and decrypt the app field in the database There are no problems running unit tests in the local environment, but bugs appear in the production environment. The reason for this is that the online environment does not support the AES algorithm Provider. It needs to be solved by adding a third-party package that supports it under the ext package or introducing a third-party library.

How to distinguish between == and .equals() method in Java

Generally speaking, equals() and "==" operator are used to compare whether two objects are equal, but there are many differences between the two: The main difference is that .equals() is a method, == is an operator. Use == to compare references, referring to whether they point to the same memory address. Use .equals() to compare the content of objects, comparing values. If .equals is not overridden, it will default to calling the nearest superclass to override this method.

2018 Year-end Summary

It’s the end of the year, so I’m going to write a little summary of 2018. This year, there have been losses and gains. The loss was the failure of a relationship that didn’t work out, and the gain was a general improvement in my personal quality. Let’s not dwell on what’s lost. Let’s talk about the gains. The gains can be divided into three aspects: physical, technical, and financial.

Java Collection Expansion

Collection Expansion ArrayList The default capacity of ArrayList is 10, so if you need to handle large amounts of data with ArrayList, you need to use the method of explicitly specifying the capacity. This can reduce unnecessary expansion operations. The main reason is that the expansion operation of ArrayList requires extra space, and it uses the Arrays.copyOf method for copying: 1 2 3 4 5 6 7 8 9 10