Using Spring Boot —— Configuration Classes

 

  springboot support java code configuration, although you can use the xml configuration, but we recommend that you use a main configuration @Configuration class. Typically, the class definition of the main method is suitable as the main @Configuration.

1. Import configuration class

  @Import introduced with annotations;

  @Configuration class will be scanned into @ComponentScan place.

 

2. Import xml configuration code

  @ImportResource

 

Guess you like

Origin www.cnblogs.com/han6/p/11505606.html