durid连接池


  <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.0.18</version>
        </dependency>



package
com.zf.spring.durid; import org.junit.Test; import com.alibaba.druid.filter.config.ConfigTools; public class DecryptDruid { /** * 对文字进行解密 * @throws Exception */ @Test public void testDecrypt() throws Exception { //解密 String word="inceQV1mknmFmzEGmWBPcG+MamYVREn4aUe+lNIRnhmQ+UuYMHBFSMwGzZv+/zkaPdsmIcOsSdKI1qQUrdjSHg=="; String decryptword = ConfigTools.decrypt(word); System.out.println(decryptword); } /** * 文字进行加密 * @throws Exception */ @Test public void testEncrypt() throws Exception { //加密 String password ="xxxxxxx"; String encryptword = ConfigTools.encrypt(password); System.out.println(encryptword); } }
原文地址:https://www.cnblogs.com/zfzf1/p/6640242.html