SpringBoot Summary of Issues (a)

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/qq125281823/article/details/89446030

1 startup problems
writing a startup class, but this class is to start on other packages, the emergence of this class is to start to start, but all of the controller / service / dao components are not available.
The right should be the starting class is the start of the packet and the packet following sub-packets, which annotation class to load the scan started.
@SpringBootApplication only the annotation recognition and SpringBoot Spring annotations, so only the loading and startup of the Spring and the added annotation SpringBoot class
@ServletComponentScan servlet3.0 the annotations are annotation, the annotation can load a servlet
@MapperScan the annotations are mybatis annotations can scan package following classes / interfaces generated proxy class (the interface with the need to scan @Mapper annotations? annotations are mybatis3.4 @Mapper versions and above)
the application.properties in mybatis.mapperLocations = classpath:. springboot1 / test / dao / * xml xml mapper mapping specified location, to specify the detailed route (including the package name detection down path is needed before)
the application.properties mybatis.typeAliasesPackage path specified in the entity class
2. the whole When the druid, because there is no increase @ServletComponentScan notes lead configurations and servlet filter can not successfully use
3. integrated spring-boot-devtools heat load
3.1) need to build plug-in maven Riga

true

3.2) runtime can not be true, because there is no true this option

Guess you like

Origin blog.csdn.net/qq125281823/article/details/89446030