更改pom
This commit is contained in:
@ -7,13 +7,13 @@
|
||||
<parent>
|
||||
<groupId>com.chinaunicom.ebtp</groupId>
|
||||
<artifactId>mall-ebtp-cloud-parent</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
<relativePath>../mall-ebtp-cloud-parent</relativePath>
|
||||
</parent>
|
||||
|
||||
<groupId>com.chinaunicom.ebtp</groupId>
|
||||
<artifactId>mall-ebtp-cloud-jpa-starter</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
<name>mall-ebtp-cloud-jpa-starter</name>
|
||||
|
||||
|
||||
|
@ -8,13 +8,13 @@
|
||||
<parent>
|
||||
<groupId>com.chinaunicom.ebtp</groupId>
|
||||
<artifactId>mall-ebtp-cloud-parent</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
<relativePath>../mall-ebtp-cloud-parent</relativePath>
|
||||
</parent>
|
||||
|
||||
<groupId>com.chinaunicom.ebtp</groupId>
|
||||
<artifactId>mall-ebtp-cloud-kafka-starter</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
<name>mall-ebtp-cloud-kafka-starter</name>
|
||||
|
||||
<dependencies>
|
||||
|
@ -7,39 +7,39 @@
|
||||
<parent>
|
||||
<groupId>com.chinaunicom.ebtp</groupId>
|
||||
<artifactId>mall-ebtp-cloud</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.chinaunicom.ebtp</groupId>
|
||||
<artifactId>mall-ebtp-cloud-parent</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>mall-ebtp-cloud-parent</name>
|
||||
|
||||
<properties>
|
||||
<tomcat.version>9.0.93</tomcat.version>
|
||||
<tomcat.version>9.0.64</tomcat.version>
|
||||
</properties>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.chinaunicom.ebtp</groupId>
|
||||
<artifactId>mall-ebtp-cloud-jpa-starter</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.chinaunicom.ebtp</groupId>
|
||||
<artifactId>mall-ebtp-cloud-kafka-starter</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.chinaunicom.mall.ebtp</groupId>
|
||||
<artifactId>uboot-common</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.chinaunicom.mall.ebtp</groupId>
|
||||
<artifactId>uboot-core</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
@ -48,26 +48,6 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-websocket</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-core</artifactId>
|
||||
<version>9.0.93</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-websocket</artifactId>
|
||||
<version>9.0.93</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
4
pom.xml
4
pom.xml
@ -13,7 +13,7 @@
|
||||
|
||||
<groupId>com.chinaunicom.ebtp</groupId>
|
||||
<artifactId>mall-ebtp-cloud</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>mall-ebtp-cloud</name>
|
||||
@ -42,7 +42,7 @@
|
||||
<poi.version>4.1.2</poi.version>
|
||||
<jedis.version>3.1.0</jedis.version>
|
||||
<redisson.version>3.11.4</redisson.version>
|
||||
<tomcat.version>9.0.93</tomcat.version>
|
||||
<tomcat.version>9.0.64</tomcat.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
|
@ -6,13 +6,13 @@
|
||||
<parent>
|
||||
<groupId>com.chinaunicom.ebtp</groupId>
|
||||
<artifactId>mall-ebtp-cloud-parent</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
<relativePath>../mall-ebtp-cloud-parent</relativePath>
|
||||
</parent>
|
||||
|
||||
<groupId>com.chinaunicom.mall.ebtp</groupId>
|
||||
<artifactId>uboot-common</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
<name>uboot-common</name>
|
||||
|
||||
<dependencies>
|
||||
@ -181,11 +181,11 @@
|
||||
<!-- <artifactId>spring-boot-starter-data-mongodb</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- jasypt -->
|
||||
<dependency>
|
||||
<groupId>com.github.ulisesbocchio</groupId>
|
||||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.github.ulisesbocchio</groupId>-->
|
||||
<!-- <artifactId>jasypt-spring-boot-starter</artifactId>-->
|
||||
<!-- <version>3.0.2</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
@ -1,73 +1,32 @@
|
||||
package com.chinaunicom.mall.ebtp.cloud.jasypt.starter;
|
||||
|
||||
|
||||
import org.jasypt.encryption.StringEncryptor;
|
||||
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
|
||||
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class JasyptStarterConfiguration {
|
||||
|
||||
@Bean( name = "stringEncryptor" )
|
||||
public StringEncryptor stringEncryptor() {
|
||||
|
||||
PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
|
||||
|
||||
SimpleStringPBEConfig config = new SimpleStringPBEConfig();
|
||||
config.setPassword("uniom-ebtp");
|
||||
config.setAlgorithm("PBEWITHHMACSHA512ANDAES_256");
|
||||
config.setKeyObtentionIterations("1000");
|
||||
config.setPoolSize("1");
|
||||
config.setProviderName("SunJCE");
|
||||
config.setSaltGeneratorClassName("org.jasypt.salt.RandomSaltGenerator");
|
||||
config.setIvGeneratorClassName("org.jasypt.iv.RandomIvGenerator");
|
||||
config.setStringOutputType("base64");
|
||||
encryptor.setConfig(config);
|
||||
|
||||
return encryptor;
|
||||
}
|
||||
public static String encryptStr(String encryptStr, String password) {
|
||||
PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
|
||||
SimpleStringPBEConfig config = new SimpleStringPBEConfig();
|
||||
config.setPassword(password);
|
||||
config.setAlgorithm("PBEWITHHMACSHA512ANDAES_256");
|
||||
config.setKeyObtentionIterations("1000");
|
||||
config.setPoolSize("1");
|
||||
config.setProviderName("SunJCE");
|
||||
config.setSaltGeneratorClassName("org.jasypt.salt.RandomSaltGenerator");
|
||||
config.setIvGeneratorClassName("org.jasypt.iv.RandomIvGenerator");
|
||||
config.setStringOutputType("base64");
|
||||
encryptor.setConfig(config);
|
||||
String enPw = encryptor.encrypt(encryptStr);
|
||||
System.out.println("加密后:" + enPw);
|
||||
String decrypt = encryptor.decrypt(enPw);
|
||||
System.out.println("解密的字符串:" + decrypt);
|
||||
return enPw;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
|
||||
SimpleStringPBEConfig config = new SimpleStringPBEConfig();
|
||||
config.setPassword("uniom-ebtp");// unicom uniom-ebtp
|
||||
config.setAlgorithm("PBEWITHHMACSHA512ANDAES_256");// PBEWithMD5AndDES PBEWITHMD5ANDDES
|
||||
config.setKeyObtentionIterations("1000");
|
||||
config.setPoolSize("1");
|
||||
config.setProviderName("SunJCE");
|
||||
config.setSaltGeneratorClassName("org.jasypt.salt.RandomSaltGenerator");
|
||||
config.setIvGeneratorClassName("org.jasypt.iv.RandomIvGenerator");
|
||||
config.setStringOutputType("base64");
|
||||
encryptor.setConfig(config);
|
||||
// String decrypt = encryptor.decrypt("Ecrp94gdEbYqQnnHDq/ILoRM9cs44vT02BvmZMqHaUphaYuAPSciSqM/loGvFcrQMjwXuoMJD6jYSSiycgzcwnav29alP7intVCpiIhM/p6fjYGevVUp0O0H0VpRF0TvSAZjVIndW4g=");
|
||||
// System.out.println("解密1的字符串:" + decrypt);
|
||||
String decrypt2 = encryptor.decrypt("OBATzbzsytt8pNrJGHyyfUIMhatPdUmpLrRHYICtkm/XiJRUrOvrVfcBNlylIreI");
|
||||
System.out.println("解密2的字符串:" + decrypt2);
|
||||
// String decrypt3 = encryptor.decrypt("OBATzbzsytt8pNrJGHyyfUIMhatPdUmpLrRHYICtkm/XiJRUrOvrVfcBNlylIreI");
|
||||
// System.out.println("解密3的字符串:" + decrypt3);
|
||||
//JasyptStarterConfiguration.encryptStr("org.apache.kafka.common.security.scram.ScramLoginModule required username=\"kafka-gjgs\" password=\"Gjgs#2023\";","uniom-ebtp");
|
||||
//JasyptStarterConfiguration.encryptStr("7i6O36#eol8!","uniom-ebtp");
|
||||
//JasyptStarterConfiguration.encryptStr("hzfsftpuser","uniom-ebtp");
|
||||
|
||||
}
|
||||
}
|
||||
//package com.chinaunicom.mall.ebtp.cloud.jasypt.starter;
|
||||
//
|
||||
//
|
||||
//import org.jasypt.encryption.StringEncryptor;
|
||||
//import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
|
||||
//import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
|
||||
//import org.springframework.context.annotation.Bean;
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//
|
||||
//@Configuration
|
||||
//public class JasyptStarterConfiguration {
|
||||
//
|
||||
// @Bean( name = "stringEncryptor" )
|
||||
// public StringEncryptor stringEncryptor() {
|
||||
//
|
||||
// PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
|
||||
//
|
||||
// SimpleStringPBEConfig config = new SimpleStringPBEConfig();
|
||||
// config.setPassword("uniom-ebtp");
|
||||
// config.setAlgorithm("PBEWITHHMACSHA512ANDAES_256");
|
||||
// config.setKeyObtentionIterations("1000");
|
||||
// config.setPoolSize("1");
|
||||
// config.setProviderName("SunJCE");
|
||||
// config.setSaltGeneratorClassName("org.jasypt.salt.RandomSaltGenerator");
|
||||
// config.setIvGeneratorClassName("org.jasypt.iv.RandomIvGenerator");
|
||||
// config.setStringOutputType("base64");
|
||||
// encryptor.setConfig(config);
|
||||
//
|
||||
// return encryptor;
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
@ -1,35 +1,35 @@
|
||||
package com.chinaunicom.mall.ebtp.cloud.jasypt.starter.util;
|
||||
|
||||
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
|
||||
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
|
||||
|
||||
public class JasyptUtil {
|
||||
|
||||
|
||||
public static String encryptStr(String encryptStr, String password) {
|
||||
PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
|
||||
|
||||
SimpleStringPBEConfig config = new SimpleStringPBEConfig();
|
||||
config.setPassword(password);
|
||||
config.setAlgorithm("PBEWITHHMACSHA512ANDAES_256");
|
||||
config.setKeyObtentionIterations("1000");
|
||||
config.setPoolSize("1");
|
||||
config.setProviderName("SunJCE");
|
||||
config.setSaltGeneratorClassName("org.jasypt.salt.RandomSaltGenerator");
|
||||
config.setIvGeneratorClassName("org.jasypt.iv.RandomIvGenerator");
|
||||
config.setStringOutputType("base64");
|
||||
encryptor.setConfig(config);
|
||||
|
||||
String enPw = encryptor.encrypt(encryptStr);
|
||||
System.out.println("加密后:" + enPw);
|
||||
String decrypt = encryptor.decrypt(enPw);
|
||||
System.out.println("解密的字符串:" + decrypt);
|
||||
return enPw;
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
JasyptUtil.encryptStr("Eshop@2021","uniom-ebtp");
|
||||
}
|
||||
|
||||
}
|
||||
//package com.chinaunicom.mall.ebtp.cloud.jasypt.starter.util;
|
||||
//
|
||||
//import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
|
||||
//import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
|
||||
//
|
||||
//public class JasyptUtil {
|
||||
//
|
||||
//
|
||||
// public static String encryptStr(String encryptStr, String password) {
|
||||
// PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
|
||||
//
|
||||
// SimpleStringPBEConfig config = new SimpleStringPBEConfig();
|
||||
// config.setPassword(password);
|
||||
// config.setAlgorithm("PBEWITHHMACSHA512ANDAES_256");
|
||||
// config.setKeyObtentionIterations("1000");
|
||||
// config.setPoolSize("1");
|
||||
// config.setProviderName("SunJCE");
|
||||
// config.setSaltGeneratorClassName("org.jasypt.salt.RandomSaltGenerator");
|
||||
// config.setIvGeneratorClassName("org.jasypt.iv.RandomIvGenerator");
|
||||
// config.setStringOutputType("base64");
|
||||
// encryptor.setConfig(config);
|
||||
//
|
||||
// String enPw = encryptor.encrypt(encryptStr);
|
||||
// System.out.println("加密后:" + enPw);
|
||||
// String decrypt = encryptor.decrypt(enPw);
|
||||
// System.out.println("解密的字符串:" + decrypt);
|
||||
// return enPw;
|
||||
//
|
||||
// }
|
||||
//
|
||||
// public static void main(String[] args) {
|
||||
// JasyptUtil.encryptStr("Eshop@2021","uniom-ebtp");
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
@ -2,7 +2,7 @@ package com.chinaunicom.mall.ebtp.cloud.security.starter.common;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.servlet.ReadListener;
|
||||
import javax.servlet.ServletInputStream;
|
||||
|
@ -6,13 +6,13 @@
|
||||
<parent>
|
||||
<groupId>com.chinaunicom.ebtp</groupId>
|
||||
<artifactId>mall-ebtp-cloud-parent</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
<relativePath>../mall-ebtp-cloud-parent</relativePath>
|
||||
</parent>
|
||||
|
||||
<groupId>com.chinaunicom.mall.ebtp</groupId>
|
||||
<artifactId>uboot-core</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
<name>uboot-core</name>
|
||||
|
||||
<dependencies>
|
||||
@ -20,7 +20,7 @@
|
||||
<dependency>
|
||||
<groupId>com.chinaunicom.mall.ebtp</groupId>
|
||||
<artifactId>uboot-common</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.1-zyhy-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
Reference in New Issue
Block a user