Java加密类Cipher的使用

public class EncryptUtils { private static final String SECRET_KEY_1 = "YIORGA4dBYp6y7u8"; private static final String SECRET_KEY_2 = "C6B8r5y7u7Uh37Sy"; private IvParameterSpec ivParameterSpec; private SecretKeySpec secretKeySpec; private Cipher cipher; public EncryptUtils() throws UnsupportedEncodingException, NoSuchPaddingException, NoSuchAlgorithmException { ivParameterSpec = new IvParameterSpec(SECRET_KEY_1.getBytes("UTF-8")); secretKeySpec = new SecretKeySpec(SECRET_KEY_2.getBytes("UTF-8"), "AES"); cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING"); } /** * Encrypt the string with this internal algorithm. * * @param toBeEncrypt string object to be encrypt. * @return returns encrypted string.

Mybatis Generator配置

配置复杂,比较臃肿,推荐使用idea的插件easyCode pom.xml配置: <!-- mybatis自动生成 start --> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.2</version> <configuration> <!--配置文件的

nexus简介

简介 Nexus repository Manager可以作为Maven的私服,意味着在Maven中央仓库和你本地项目之间多了一层代理。在本地访问已经加载过的jar包时,私

lombok详解

val 精简变量修饰,类似Scala,但是默认追加了final修饰符 val list = new ArrayList<String>(); //等同于 final ArrayList<String> list = new ArrayList<String>(); var 精简变量修饰,类似Scala,修饰变量 val list =