求助关于dao层接口无法注入的问题
楼主小白,使用MapperScannerConfigurer自动注入dao层接口为什么总是失败
***************************
APPLICATION FAILED TO START
***************************
Description:
Field demo1Dao in com.example.demo.service.Demo1Servicelmp required a bean of type 'com.example.demo.Dao.Demo1Dao' that could not be found.
Action:
Consider defining a bean of type 'com.example.demo.Dao.Demo1Dao' in your configuration.
我的xml配置:
<!-- spring和MyBatis整合 -->
<bean id="pluginsSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="pluginsDataSource" />
<!--扫描mapping.xml文件 -->
<property name="mapperLocations">
<list>
<value>classpath*:com/example/demo/mapper/*.xml</value>
</list>
</property>
<!-- 设置实体类的别名;在mapper配置文件中只要写类名就行,无需写出全限定名称 -->
<property name="typeAliasesPackage" value="com.example.demo.entity;"/>
</bean>
<!--DAO接口所在包名 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="eom.example.demo