diff --git a/datax-admin/pom.xml b/datax-admin/pom.xml index 9ac7e635..8aff0a55 100644 --- a/datax-admin/pom.xml +++ b/datax-admin/pom.xml @@ -104,11 +104,11 @@ - - com.github.ulisesbocchio - jasypt-spring-boot-starter - 2.0.0 - + + + + + com.alibaba fastjson diff --git a/datax-admin/src/main/java/com/wugui/datax/admin/util/JasyptUtil.java b/datax-admin/src/main/java/com/wugui/datax/admin/util/JasyptUtil.java index 92069c33..832d3ff8 100644 --- a/datax-admin/src/main/java/com/wugui/datax/admin/util/JasyptUtil.java +++ b/datax-admin/src/main/java/com/wugui/datax/admin/util/JasyptUtil.java @@ -1,42 +1,42 @@ -package com.wugui.datax.admin.util; - - -import org.jasypt.encryption.pbe.StandardPBEStringEncryptor; -import org.jasypt.encryption.pbe.config.EnvironmentPBEConfig; - -public class JasyptUtil { - - final String algorithm = "PBEWithMD5AndDES";// 加密的算法,这个算法是默认的 - final String password = "hVO0O2NeySpANQUk"; // 加密的密钥 配置文件中 jasypt.encryptor.password - StandardPBEStringEncryptor standardPBEStringEncryptor; - - { - standardPBEStringEncryptor = new StandardPBEStringEncryptor(); - EnvironmentPBEConfig config = new EnvironmentPBEConfig(); - config.setAlgorithm(algorithm); - config.setPassword(password); - standardPBEStringEncryptor.setConfig(config); - } - - public String encrypt(String plainText) { - return standardPBEStringEncryptor.encrypt(plainText); - } - - //解密 - public String decrypt(String encryptedText) { - return standardPBEStringEncryptor.decrypt(encryptedText); - } - - public static void main(String[] args) { - JasyptUtil test = new JasyptUtil(); -// System.out.println(test.decrypt("k6vl6SNCrZ8hyTcK4ew+pQ==")); -// System.out.println(test.decrypt("nFNBAlHJtaE5tz9yKEqYSA==")); - - System.out.println(test.encrypt("root")); - System.out.println(test.encrypt("mysql")); - - - - } - -} +//package com.wugui.datax.admin.util; +// +// +//import org.jasypt.encryption.pbe.StandardPBEStringEncryptor; +//import org.jasypt.encryption.pbe.config.EnvironmentPBEConfig; +// +//public class JasyptUtil { +// +// final String algorithm = "PBEWithMD5AndDES";// 加密的算法,这个算法是默认的 +// final String password = "hVO0O2NeySpANQUk"; // 加密的密钥 配置文件中 jasypt.encryptor.password +// StandardPBEStringEncryptor standardPBEStringEncryptor; +// +// { +// standardPBEStringEncryptor = new StandardPBEStringEncryptor(); +// EnvironmentPBEConfig config = new EnvironmentPBEConfig(); +// config.setAlgorithm(algorithm); +// config.setPassword(password); +// standardPBEStringEncryptor.setConfig(config); +// } +// +// public String encrypt(String plainText) { +// return standardPBEStringEncryptor.encrypt(plainText); +// } +// +// //解密 +// public String decrypt(String encryptedText) { +// return standardPBEStringEncryptor.decrypt(encryptedText); +// } +// +// public static void main(String[] args) { +// JasyptUtil test = new JasyptUtil(); +//// System.out.println(test.decrypt("k6vl6SNCrZ8hyTcK4ew+pQ==")); +//// System.out.println(test.decrypt("nFNBAlHJtaE5tz9yKEqYSA==")); +// +// System.out.println(test.encrypt("root")); +// System.out.println(test.encrypt("mysql")); +// +// +// +// } +// +//} diff --git a/datax-admin/src/main/resources/application.yml b/datax-admin/src/main/resources/application.yml index b299670d..8e0ad326 100644 --- a/datax-admin/src/main/resources/application.yml +++ b/datax-admin/src/main/resources/application.yml @@ -3,8 +3,8 @@ server: spring: #数据源 datasource: - username: ENC(6WpAwrc9TXkZo2aIXeYtHw==) - password: ENC(flGBggksQibhINCvRmntzw==) + username: root + password: mysql url: jdbc:mysql://localhost:3306/datax_web?serverTimezone=Asia/Shanghai&useLegacyDatetimeCode=false&useSSL=false&nullNamePatternMatchesAll=true&useUnicode=true&characterEncoding=UTF-8 driver-class-name: com.mysql.jdbc.Driver @@ -38,9 +38,9 @@ spring: socketFactory: class: javax.net.ssl.SSLSocketFactory -jasypt: - encryptor: - password: hVO0O2NeySpANQUk +#jasypt: +# encryptor: +# password: hVO0O2NeySpANQUk management: