I configure it like this in the application-context.xml
<mybatis:scan base-package="com.db"/>
And add @Component
for the mapper interface.
@Component
public interface MenuMapper {}
And autowire it like this.
@Autowired
MenuMapper menuMapper;
It generates errors in IDEA. The error is
No beans of type MenuMapper found.