Use annotations to introduce multiple configuration files when @ContextConfiguration spring consolidates JUNIT4 tests
@ContextConfiguration (Locations= ".. /applicationcontext.xml ") = simpleconfiguration. class = {"Classpath*:/spring1.xml", "Classpath*:/spring2.xml"})
The purpose of @EnableAutoConfigurationannotation is to have spring Boot automatically configure the spring framework based on the dependencies declared by the application, which reduces the developer's workload. The annotations "@RestController" and "@RequestMapping" are provided by Spring MVC to create a REST service. These two annotations are not related to Spring Boot itself.
You only need to add "@EnableAutoConfiguration" annotations on the master configuration Java class to enable automatic configuration. Spring Boot's Auto-configuration feature is not intrusive, just as a basic default implementation. Developers can override the functionality provided by automatic configuration by defining other beans. For example, when the application has its own data source bean defined, the HSQLDB provided by the automatic configuration will not take effect. This gives developers a lot of flexibility. You can quickly create a prototype application that can be run immediately, and can be constantly modified and adapted to suit the needs of application development at different stages. Perhaps at the beginning of the application, the embedded memory database (such as HSQLDB) is sufficient, and later in the need to replace the MySQL database. Spring Boot makes such a switch easy.
Those annotations in the "@ContextConfiguration" Java World