Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'usersDao' for bean class [com.dahua.dssc.users.dao.UsersDaoImpl] conflicts with existing, non-compatible bean definition of same name and class [com.dahua.dssc.user.UsersDaoImpl]
public interface JDBCBaseDao<T, ID extends Serializable> {其他略。。。}
@Repository
public class JDBCBaseDaoImpl<T, PK extends Serializable>
implements JDBCBaseDao<T, PK> {
@Autowired
private JdbcTemplate jdbcTemplate ;
public SimpleJdbcCall createSimpleJdbcCall() {
return new SimpleJdbcCall(this.jdbcTemplate);
}
其他略。。。
}
@Transactional
@Repository
public interface UsersDao extends JDBCBaseDao<Users, Long> {
// 显示全部用户
public List<Users> getUsers(Pager pager);
public int countAll() ;
}
public class UsersDaoImpl extends JDBCBaseDaoImpl<Users, Long> implements UsersDao{
}
public class AllTests extends BaseTestTemplate implements test{
@Resource(name="usersDao")
private UsersDao usersDao;
@Test
public void testList() {
//删除方法
usersDao.deleteById(Users.class,3354L);
}
其他略。。。
}
报错信息及部分代码
分享到:
相关推荐
org.springframework.web.bind.annotation.SessionAttributes.class org.springframework.web.bind.support.ConfigurableWebBindingInitializer.class org.springframework.web.bind.support....
3. **元数据与注解处理**:`org.springframework.core.annotation`包实现了对Java注解的处理,包括注解的元数据解析、处理和应用,使得基于注解的编程成为可能。Spring框架大量使用注解简化配置,如@Component、@...
6. `org.springframework.core.annotation`: 包含了对Java注解的处理,如`MergedAnnotations`接口,用于合并和检索注解信息,是Spring元数据解析的关键部分。 7. `org.springframework.core.type`: 提供了类型扫描...
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.class org.springframework.test.annotation.DirtiesContext.class org.springframework.test.annotation.ExpectedException.class...
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @...
### 关于 "org.springframework.orm.hibernate3.LocalSessionFactoryBean" 未找到问题的知识点解析 #### 一、问题背景 在开发基于Spring与Hibernate整合的应用时,可能会遇到“`org.springframework.orm.hibernate...
spring mvc 开发的必须有的架包org.springframework.web.servlet-3.0.5.RELEASE.jar
### 关于 `org.springframework.dao.InvalidDataAccessApiUsageException` 的深入解析 在Spring与Hibernate集成开发过程中,开发者可能会遇到各种各样的异常问题。其中一种较为常见的异常是 `org.springframework....
org.springframework.web.servlet-3.0.0.M4.jar
org.springframework.transaction-3.0.0.M4.jar
The import org.springframework.web.bind.annotation cannot be resolved. json.jar spring.jar mail.jar log4j.jar
14. <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" /> 15. 16. <!-- 对模型视图名称的解析,即在模型视图名称添加前后缀 --> 17. <bean class="org....
org.springframework.osgi.extensions.annotation-1.2.1.jar
org.springframework.beans.annotation org.springframework.beans.factory org.springframework.beans.factory.access org.springframework.beans.factory.access.el org.springframework.beans.factory.annotation...
nested exception is java.lang.IllegalStateException: Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are ...
xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:oscache=...
nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]: ...
赠送jar包:jakarta.annotation-api-1.3.5.jar; 赠送原API文档:jakarta.annotation-api-1.3.5-javadoc.jar; 赠送源代码:jakarta.annotation-api-1.3.5-sources.jar; 赠送Maven依赖信息文件:jakarta.annotation...
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689) at org.springframework.web.servlet.mvc.method....
import org.springframework.context.annotation.ComponentScan; @SpringBootApplication @ComponentScan(basePackages = {"com.example.*"}) //指定扫描包路径 public class DemoApplication { public static void ...