a guest Apr 16th, 2018 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- You need not put all your `@Configuration` into a single class. The `@Import` annotation can be used to import additional configuration classes. Alternatively, you can use `@ComponentScan` to automatically pick up all Spring components, including `@Configuration` classes.
- `@EnableAutoConfiguration` attempts to automatically configure Spring application based on classpath (dependencies) and what beans you have defined.
- `@SpringBootApplication` = `@Configuration` + `@EnableAutoConfiguration` + `@ComponentScan`
- `@ImportResource` loads XML configuration files (springboot discourages usage of xmls though).
- >If a bean has one constructor, you can omit the `@Autowired`
RAW Paste Data