idea to solve Could not autowire. No beans of 'xxx' type found. error

Method 1: added to the mapper file @Repository annotation, which is from the new spring2.0 a comment for Spring to simplify the development of data access

 

Method 2: added to the mapper @Component annotation file, the ordinary spring pojo instantiated into the vessel, corresponding to the configuration file <bean id = "" class = "" />


Published 71 original articles · won praise 22 · views 6031

Guess you like

Origin blog.csdn.net/Kevin__Coder/article/details/104212328