The main program plus @componentScan + DAO layer plus @ Mapper not visit
The main program plus @ componentScan + DAO layer plus @ the Component or
@ the Component ( "userDao" ) not visit
The main program plus @ componentScan + DAO layer plus @ Repository or @ Repository ( "userDao") not visit
The main program plus @ MapperScan ( "com.jay.dao") + DAO-plus @ Mapper access to
The main program plus @ MapperScan ( "com.jay.dao") + DAO-plus @ the Component access to
The main program plus @ MapperScan ( "com.jay.dao") + DAO-plus @ the Repository or @ ** Repository ( "userDao") ** access to
Therefore the main added only @ can MapperScan ( "com.jay.dao") automatically scan the dao injection layer and
Dao layer but not add or @Mapper @Repository @Component or not to see the main program and a member (though springboot implicit scanned and injected)
It is recommended plus @Mapper or @Repository in Dao layer
And thus lead to a problem:
the difference between the @MapperScan and @ComponentScan
The difference between spring and @ComponentScan of @MapperScan
Maven dependency delete unused
java.lang.NoSuchMethodError: org.springframework.core.ResolvableType.forInstance error solution
I think it is to see the annotation name @ComponentScan it really is scanned to but just know he's a Component but did not know it acts dao layer in a web project
and @MapperScan then see the name that he is the way in accordance with the scan Mapper layer not only to the scanning and injection success dao layer
welcomed the discussion. . .