AnnotatedMountScannerConfig no longer picking up base packages in 3.1.5
reckart opened this issue · 5 comments
It looks like in 3.1.5, the AnnotatedMountScannerConfig
is initialized way before com.giffing.wicket.spring.boot.starter.app.classscanner.ClassCandidateScanner.postConstruct()
is called during startup. Thus, AnnotatedMountScannerConfig
does not find additional base packages set on the WicketClassCandidatesHolder
by ClassCandidateScanner.postConstruct()
.
I was able to work around the issue by manually setting the base packages in my Spring Boot main class:
@Autowired
public void configureBasePackagesWorkaround(WicketClassCandidatesHolder aHolder)
{
aHolder.getBasePackages().add(BASE_PACKAGE_1);
aHolder.getBasePackages().add(BASE_PACKAGE_1);
}
Does the problem occour after upgrading? Is it related to the Upgrade of Spring Boot?
I could not really upgrade Spring Boot (2.5.7 -> 2.6.1) without upgrading Wicket Spring Boot (3.0.4 -> 3.1.5).
What I tried through was using Wicket Spring Boot 3.1.5 with Spring Boot 2.5.7 - that didn't work either.
So what I did in the end to try figuring out how to get it working was setting a breakpoint in AnnotatedMountScannerConfig
to see when it would be called and there I noticed that the breakpoint hit before another one in ClassCandidateScanner.postConstruct()
was hit. Hence the report.
Can you please try Wicket Spring Boot 3.1.6
3.1.6 seems to work. I updated the dependency, commented out my workaround, started up and it looked good. Thanks for the quick fix!