Use static factory methods and proxyBeanMethods = false

It is better to be explicit about beans of type `Module` and make
sure they don't interfere with Spring trying to enhance
`@Configuration` classes. The tests are now clear of the pesky
warning logs, and there is a new section in the README.
This commit is contained in:
Dave Syer
2022-03-20 16:27:23 +00:00
committed by GitHub
parent c22fb6a976
commit e71d6aca56
21 changed files with 54 additions and 25 deletions

View File

@@ -65,7 +65,7 @@ public class DevelepmentStageInjectorTest {
static class ModulesConfig {
@Bean
TestGuiceModule testGuiceModule() {
static TestGuiceModule testGuiceModule() {
return new TestGuiceModule();
}

View File

@@ -79,7 +79,7 @@ public class SpringModuleWrappedTests {
protected static class ModuleProviderConfig {
@Bean
public ProviderModule module() {
public static ProviderModule module() {
return new ProviderModule();
}