Move @AssertMissingBean to tests

Use @AssertMissingBean only for tests.
This commit is contained in:
Phillip Webb
2013-07-06 10:51:16 -07:00
parent d91e802139
commit a6341dc0af
4 changed files with 44 additions and 15 deletions

View File

@@ -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