Move @AssertMissingBean to tests
Use @AssertMissingBean only for tests.
This commit is contained in:
@@ -177,7 +177,6 @@ to change the default values imperatively in Java, so get more control
|
||||
over the process. You can do this by declaring a bean of the same
|
||||
type in your application context, e.g. for the server properties:
|
||||
|
||||
@AssertMissingBean(ServerProperties.class)
|
||||
@Bean
|
||||
public ServerProperties serverProperties() {
|
||||
ServerProperties server = new ServerProperties();
|
||||
@@ -185,10 +184,6 @@ type in your application context, e.g. for the server properties:
|
||||
return server;
|
||||
}
|
||||
|
||||
Note the use of `@AssertMissingBean` to guard against any mistakes
|
||||
where the bean is already defined (and therefore might already have
|
||||
been bound).
|
||||
|
||||
## Server Configuration
|
||||
|
||||
The `ServerProperties` are bound to application properties, and
|
||||
|
||||
Reference in New Issue
Block a user