Home > Back-end >  Springboot scan package Consider defining a bean of the type error
Springboot scan package Consider defining a bean of the type error

Time:01-21


Springboot error




According to the website with @ Service annotations and @ MapperScan annotations and @ ComponentScan error

CodePudding user response:

If the mapper you see if you were at the class scanned @ MapperScan (cn. Anjun. Admin. "mapper")
Or the corresponding XML configuration file path is wrong

CodePudding user response:

Is scanned, and the corresponding XML file feeling also have no wrong

CodePudding user response:

I also appears the question, brother of interpretation

CodePudding user response:

Add a configuration, specify the mapper class package, and the location of the XML file:
 
Mybatis. Type - aliases - package: com. Nice. Mapper
Mybatis mapper - locations: the classpath: mapper/* mapper XML
  • Related