You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi there,
I'm using springboot v2.6.3 with spring version 5.3.15.
And here's my starter class source:
@SpringBootApplication
@EnableDubbo
@EnableEncryptableProperties
@PropertySource({ "classpath:app-patrolworker/config/application-worker.properties" })
@ImportResource({ "classpath:META-INF/spring/xhunterlib-crawler-polardb.xml",
"classpath:app-patrolworker/spring/*.xml" })
public class WorkerApplication {
private static final Logger logger = LoggerFactory.getLogger(WorkerApplication.class);
public static void main(String... args) {
String parLvStr = System.getProperty("parallelLevel");
Preconditions.checkArgument(
StringUtils.isNotBlank(parLvStr) && StringUtils.isNumeric(parLvStr),
"Startup VM property 'parallelLeval' must be specified.");
String schedTag = System.getProperty("schedTag");
Preconditions.checkArgument(StringUtils.isNotBlank(schedTag)
&& ResourceManagementService.checkSchedTagFormat(schedTag),
"Startup VM property 'schedTag' must be specified, and must be of form: 'patrol-clusterName-schedId'.");
logger.info(MessageFormatter.format(
"Loading worker application with schedTag: {}, parallelLevel: {}.", schedTag,
parLvStr));
try {
SpringApplication.run(WorkerApplication.class, args);
} catch (Throwable t) {
ExceptionUtils.printAsString(t);
throw t;
}
}
}
there are some encrypted properties in the application-worker.properties, and the start up logs also showing that jasypt recognized and processed this property file:
12:27:48.283 [main] INFO jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource class path resource [app-patrolworker/config/application-worker-test.properties] [org.springframework.core.io.support.ResourcePropertySource] to EncryptableMapPropertySourceWrapper
When I inject bean properties using @Value annotation, all things went well, but when I doing that in a xml configuration manner, those encrypted properties didn't get a decrypt.
I googled for a while and I did find a solution using a class named org.jasypt.spring31.properties.EncryptablePropertyPlaceholderConfigurer to solve this but it's for spring 3.x apparently. In recent versions of jasypt, it's gone.
would you please support xml configuration properties decryption with spring 5.x?
thanks.
The text was updated successfully, but these errors were encountered:
hi there,
I'm using springboot v2.6.3 with spring version 5.3.15.
And here's my starter class source:
there are some encrypted properties in the
application-worker.properties
, and the start up logs also showing that jasypt recognized and processed this property file:When I inject bean properties using
@Value
annotation, all things went well, but when I doing that in a xml configuration manner, those encrypted properties didn't get a decrypt.I googled for a while and I did find a solution using a class named
org.jasypt.spring31.properties.EncryptablePropertyPlaceholderConfigurer
to solve this but it's for spring 3.x apparently. In recent versions of jasypt, it's gone.would you please support xml configuration properties decryption with spring 5.x?
thanks.
The text was updated successfully, but these errors were encountered: