Add macro for @SpringBootApplication
This commit is contained in:
parent
40972549c2
commit
523e26f351
|
@ -147,11 +147,7 @@ Although batch processing can be embedded in web apps and WAR files, the simpler
|
|||
include::complete/src/main/java/hello/Application.java[]
|
||||
----
|
||||
|
||||
`@SpringBootApplication` is a convenience annotation that adds all of the following:
|
||||
|
||||
- `@Configuration` tags the class as a source of bean definitions for the application context.
|
||||
- `@EnableAutoConfiguration` tells Spring Boot to start adding beans based on classpath settings, other beans, and various property settings.
|
||||
- `@ComponentScan` tells Spring to look for other components, configurations, and services in the the `hello` package allowing it to find the batch details.
|
||||
include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/spring-boot-application.adoc[]
|
||||
|
||||
For demonstration purposes, there is code to create a `JdbcTemplate`, query the database, and print out the names of people the batch job inserts.
|
||||
|
||||
|
|
Loading…
Reference in New Issue