Comments (19)
As far as I can see in the code, it has been already declared as static return, why does it still complain?
code ref
from jasypt-spring-boot.
FYI:
I have fixed this error
WARNING: @Bean method ServiceConfig.propertyPlaceholderConfigurer is non-static and returns an object assignable to Spring's BeanFactoryPostProcessor interface. This will result in a failure to process annotations such as @Autowired, @Resource and @PostConstruct within the method's declaring @Configuration class. Add the 'static' modifier to this method to avoid these container lifecycle issues; see @Bean javadoc for complete details.
By adding the static
modifier to PropertySourcesPlaceholderConfigurer
to
@Bean
public static PropertySourcesPlaceholderConfigurer propertyPlaceholderConfigurer() {
return new PropertySourcesPlaceholderConfigurer();
}
which I did not do before.
from jasypt-spring-boot.
do you need further help?
from jasypt-spring-boot.
For the tomcat one, yes.
from jasypt-spring-boot.
I still have the tomcat issue, but the FYI message is just for another issue.
from jasypt-spring-boot.
no way to reopen this?
from jasypt-spring-boot.
Yeah, please reopen and explain what's the situation. If you have sample code where the issue manifests even better so I can test and make sure I got you covered.
from jasypt-spring-boot.
I found there is no way to re-open the issue.
The jar actually works pretty well with my sample codebase, but the real integration does the opposite.
from jasypt-spring-boot.
As far as warnings go,beanNamePlaceholderRegistryPostProcessor has been static for a while and there's no warning being raised. Check out the demo apps, there's a bunch of them
from jasypt-spring-boot.
what's the "real" integration? Can you create a repo with a "real" example in your github accound and share it with me?
from jasypt-spring-boot.
Yes, I was trying to confirm with you whether you have seen that issue first.
Now, I guess I need to try to reproduce the issue now. I still do not know the root cause yet.
from jasypt-spring-boot.
Will get back to this by the end of this week.
from jasypt-spring-boot.
Seeing this issue with "com.github.ulisesbocchio:jasypt-spring-boot-starter:1.8"
from jasypt-spring-boot.
@gorky, Can you explain what you see? Is it just the warning? On tomcat? Do you have a code sample?
from jasypt-spring-boot.
Thanks for your quick reply!
It's the Tomcat that is embedded in Spring Boot, although it hasn't started when these methods are logged. I don't currently have a code sample I can post in a public forum (my apologies).
[2016-10-17 17:37:14.278 -0500] - 17939 WARN [main] --- o.s.c.a.ConfigurationClassPostProcessor: Cannot enhance @Configuration bean definition 'beanNamePlaceholderRegistryPostProcessor' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'. [2016-10-17 17:37:15.112 -0500] - 17939 INFO [main] --- c.u.j.EnableEncryptablePropertySourcesPostProcessor: Post-processing PropertySource instances [2016-10-17 17:37:15.178 -0500] - 17939 INFO [main] --- c.u.j.c.StringEncryptorConfiguration: String Encryptor custom Bean not found with name 'jasyptStringEncryptor'. Initializing String Encryptor based on properties with name 'jasyptStringEncryptor'
Annoyingly, I have a Jar in the classpath with a Config that is defining a bean with the name jasyptStringEncryptor and that config is definitely not getting loaded by Spring Boot. And this is causing decryption to fail as the seeding password doesn't get read/loading. When I drop the dependency on the jasypt-spring-boot-starter, the jar and included config are read but then fail on loading due to missing required jasypt classes.
We are using org.springframework.boot.loader.PropertiesLauncher with -Dloader.path set to include the jars that have our jasypt beans defined. Feel free to PM me.
Regards,
Steve
from jasypt-spring-boot.
Found the issue with the jar not being picked up -- a directory name had be changed w/o an update in the -Dloader.path. When I corrected the directory name I started getting quite a few interesting failures -- trying to work my way through them. I will keep this thread updated.
from jasypt-spring-boot.
Alright, thanks, let me know if you need further assistance. I was checking the sample apps I have and I don't see the warning in any of them
from jasypt-spring-boot.
Ok, this is issue is resolved. I've walked into some others, but I can open a ticket and supply a test case. Feel free to close this one as "End User Configuration Error -- corrected".
And thanks!
from jasypt-spring-boot.
The issue is fixed now in version 4.2.6, 4.3 RC2. Please refer this ticket https://jira.spring.io/browse/SPR-14234
from jasypt-spring-boot.
Related Issues (20)
- I use a Gradle Project. Is this plugin just for maven project? HOT 1
- Spring RabbitMQ credentials can't be encrypted
- Create custom encryptor bean with an error HOT 4
- Password rotation possibility HOT 4
- jasypt-spring-boot 3.0.5 doesn't work with spring boot 2.3.12.RELEASE HOT 1
- Multiple property decryption
- proxy-property-sources=true causes ClassCastException HOT 1
- [BUG] in springboot 2.0.3,the "spring.config.name" properties lose efficacy
- JASYPT fails to bind properties 'spring.datasource.password' while using with ENC() HOT 1
- 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
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.