-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spring Boot autoconfiguration #766
Comments
The answer turned out to be simple: add the // this does work
@Configuration
@ComponentScan
@EnableAutoConfiguration
public class MySpringApp implements CommandLineRunner {
// ... same as above |
Hi @remkop, i'm also having this problem, but proposed solution does not work (also because i use
any suggestions? |
@rome-legacy It’s hard to tell what could be the problem. Can you share your code? |
Hi @remkop , anyway, after adding the right dependency (https://github.com/remkop/picocli/tree/master/picocli-spring-boot-starter) it seems to work now. thx for your great library. if i will face any errors with spring boot, i'll let you know :-) regards |
@rome-legacy Great to hear the problem was resolved. I updated the user manual to mention the dependency: https://picocli.info/#_spring_boot_example |
Working with the new
picocli-spring-boot-autoconfigure
module, I seem to have a problem getting the Spring Boot autoconfiguration to work forPicocliSpringFactory
.I expect this configuration to be able to produce the auto-configured factory:
What actually happens is that the application fails to start because the
IFactory
bean cannot be found in the application context. What am I doing wrong?Note that the above does work if I
@Import
the factory.But if the application needs to explicitly
@Import
the factory, we are configuring manually, so what is the point of the auto-configuration? (And in fact, with the@Import
statement, the application works even without the auto-configuration class...)I cannot see anything wrong with the auto-configuration code, but showing it here for reference: the new
picocli-spring-boot-autoconfigure
module has the following auto-configuration class:As per the docs, the jar that this class (and the
PicocliSpringFactory
class) are in has aMETA-INF/spring.factories
file with the following content:Any idea what I'm doing wrong?
The text was updated successfully, but these errors were encountered: