Cannot find class for bean with name解决

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/jacke121/article/details/74300591


org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [UserService] for bean with name 'UserService' defined in file 


解决:

Bean class是需要加包名路径的:

 

<bean class="com.db.dao.XXXXXDao" id="cleaneddataDao" lazy-init="true">
   <property name="sessionFactory" ref="sessionFactory"></property>
</bean>


没有更多推荐了,返回首页