Comments (12)
It should work, @EnableEncryptableProperties
imports some configuration that registers a BeanFactoryPostProcessor
to decorate property sources present in the Environment.
@EncryptablePropertySource
is simpler, it just enables one specific property source with jasypt capabilities.
Do you have (or can create) a test app in Github where the problem manifests?
from jasypt-spring-boot.
@ulisesbocchio Thanks for the reply.
I will upload a sample later.
But I saw the spring-boot package get used in the EnableEncryptablePropertySourcesPostProcessor.java
, could it be a problem?
from jasypt-spring-boot.
Here is ref repo:
https://github.com/chenrui333/jyspert-spring-sample
The command line to run is ./gradlew appRun
from jasypt-spring-boot.
jasypt-spring-boot
does not work with vanilla Spring as properties source loading is different,
Spring Boot used PropertySourceLoader
, while vanilla Spring used PropertySourcesPlaceholderConfigurer
from jasypt-spring-boot.
Alright, let me take a look at your project...sorry for the delay
from jasypt-spring-boot.
Thanks.
from jasypt-spring-boot.
Any update?
from jasypt-spring-boot.
I'll get back to you today... sorry for the delay
from jasypt-spring-boot.
You're missing this in your TestConfig:
@Bean
PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
return new PropertySourcesPlaceholderConfigurer();
}
That's mandatory if you want to enable PropertySources in general. Basically, without that bean, not even Spring's @PropertySource
annotation works. In Spring Boot, there's an auto configuration for it in org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
from jasypt-spring-boot.
Let me re-try it.
UPDATE:
Works pretty good! Thanks!
from jasypt-spring-boot.
Another quick question is that whether I can use gradle to setup system property that it can be picked up by Spring configuration.
from jasypt-spring-boot.
you gotta pass the system property to tomcat or whatever servlet container you're using when you run your application if you use it out of the box. Otherwise you can define your own SpringEncryptor bean and retrieve the password from wherever you want.
from jasypt-spring-boot.
Related Issues (20)
- Is there an unresolvable circular reference HOT 3
- 3.x.x 以后可以自定义加密器吗,配置jasypt.encryptor.bean的方式
- GraalVM native app startup with errors. HOT 1
- Windows and Linux compatibility issues HOT 3
- AES256GCM, Base64 decod of key file failed...
- StackOverflowError with SpringBoot 3.1.5 and jasypt-spring-boot-starter 3.0.5 with ${cors.origins.allowed:#{http://localhost:4200}} HOT 2
- jasypt not decrypting already encrypted property (i.e in application.properties file) in xml based configuration spring boot project HOT 3
- Usage of StandardEncryptableEnvironment with additional active profile(s) and custom prefix and suffix breaks decryption
- String Encryptor custom Bean not found with name 'jasyptStringEncryptor' after upgrading to AWS CLOUD Spring3(implementation platform("io.awspring.cloud:spring-cloud-aws-dependencies:3.0.4)
- Source code to refer in order to understanding how jasypt able to "intercept" and "massage" the configuration value
- NoSuchAlgorithmException: SHA1PRNG SecureRandom not available HOT 1
- nacos password decryption in application.yml HOT 2
- jasypt-spring-boot-starter-3.0.5 does not work with springboot latest version 3.2.2
- When will the service "jasypt-spring-boot" 3.0.5 end?
- Is this project still maintained?
- Is there a plan for the project to support jdk17?
- jasypt.encryptor.password property is treated as sensitive by code scan tools
- can not decrypt in spring cloud alibaba 20222.0.0.0 with nacos
- Stack overflow when config is AA=${AA}
- jasypt: ecryption of Properties failed, make sure encryption/decryption passwords match apres upgrading from version 2.3 to 3.0.5 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jasypt-spring-boot.