Giter Site home page Giter Site logo

Comments (19)

chenrui333 avatar chenrui333 commented on May 22, 2024

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.

chenrui333 avatar chenrui333 commented on May 22, 2024

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.

ulisesbocchio avatar ulisesbocchio commented on May 22, 2024

do you need further help?

from jasypt-spring-boot.

chenrui333 avatar chenrui333 commented on May 22, 2024

For the tomcat one, yes.

from jasypt-spring-boot.

chenrui333 avatar chenrui333 commented on May 22, 2024

I still have the tomcat issue, but the FYI message is just for another issue.

from jasypt-spring-boot.

chenrui333 avatar chenrui333 commented on May 22, 2024

no way to reopen this?

from jasypt-spring-boot.

ulisesbocchio avatar ulisesbocchio commented on May 22, 2024

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.

chenrui333 avatar chenrui333 commented on May 22, 2024

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.

ulisesbocchio avatar ulisesbocchio commented on May 22, 2024

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.

ulisesbocchio avatar ulisesbocchio commented on May 22, 2024

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.

chenrui333 avatar chenrui333 commented on May 22, 2024

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.

chenrui333 avatar chenrui333 commented on May 22, 2024

Will get back to this by the end of this week.

from jasypt-spring-boot.

gorky avatar gorky commented on May 22, 2024

Seeing this issue with "com.github.ulisesbocchio:jasypt-spring-boot-starter:1.8"

from jasypt-spring-boot.

ulisesbocchio avatar ulisesbocchio commented on May 22, 2024

@gorky, Can you explain what you see? Is it just the warning? On tomcat? Do you have a code sample?

from jasypt-spring-boot.

gorky avatar gorky commented on May 22, 2024

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.

gorky avatar gorky commented on May 22, 2024

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.

ulisesbocchio avatar ulisesbocchio commented on May 22, 2024

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.

gorky avatar gorky commented on May 22, 2024

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.

lakshmandev avatar lakshmandev commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.