This commit is contained in:
Stephane Nicoll 2015-11-30 15:08:40 +01:00
parent 5cdd874d55
commit 1ec40ed666
1 changed files with 2 additions and 2 deletions

View File

@ -101,8 +101,8 @@ Boot. A `SpringApplication` changes its `ApplicationContext` class depending on
thinks it needs a web application or not. The first thing you can do to help it is to just
leave the servlet API dependencies off the classpath. If you can't do that (e.g. you are
running 2 applications from the same code base) then you can explicitly call
`SpringApplication.setWebEnvironment(false)`, or set the `applicationContextClass`
property (through the Java API or with external properties).
`setWebEnvironment(false)` on your `SpringApplication` instance, or set the
`applicationContextClass` property (through the Java API or with external properties).
Application code that you want to run as your business logic can be implemented as a
`CommandLineRunner` and dropped into the context as a `@Bean` definition.