`

org.springframework.context.annotation.ConflictingBeanDefinitionException: Annot

 
阅读更多
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);
}
其他略。。。
}
报错信息及部分代码
分享到:
评论

相关推荐

    spring-web-2.5.jar

    org.springframework.web.bind.annotation.SessionAttributes.class org.springframework.web.bind.support.ConfigurableWebBindingInitializer.class org.springframework.web.bind.support....

    org.springframework.core.jar

    3. **元数据与注解处理**:`org.springframework.core.annotation`包实现了对Java注解的处理,包括注解的元数据解析、处理和应用,使得基于注解的编程成为可能。Spring框架大量使用注解简化配置,如@Component、@...

    org.springframework.core_3.1.1.RELEASE.jar

    6. `org.springframework.core.annotation`: 包含了对Java注解的处理,如`MergedAnnotations`接口,用于合并和检索注解信息,是Spring元数据解析的关键部分。 7. `org.springframework.core.type`: 提供了类型扫描...

    spring-mock.jar

    org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.class org.springframework.test.annotation.DirtiesContext.class org.springframework.test.annotation.ExpectedException.class...

    org.springframework.test-3.0.2.RELEASE.jar

    import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @...

    org.springframework.web.servlet-3.0.5.RELEASE.jar

    spring mvc 开发的必须有的架包org.springframework.web.servlet-3.0.5.RELEASE.jar

    org.springframework.web.servlet-3.0.0.M4.jar

    org.springframework.web.servlet-3.0.0.M4.jar

    org.springframework.transaction-3.0.0.M4.jar

    org.springframework.transaction-3.0.0.M4.jar

    spring开发中的jar包,json,annotation

    The import org.springframework.web.bind.annotation cannot be resolved. json.jar spring.jar mail.jar log4j.jar

    org.springframework.osgi.extensions.annotation-1.2.1.jar

    org.springframework.osgi.extensions.annotation-1.2.1.jar

    asm-3.2.3.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...

    springmvc-ibatis

    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=...

    springAOP demo 带错误解决文档

    nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]: ...

    Spring 3.0所需jar文件和对应的配置文件

    nested exception is java.lang.IllegalStateException: Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are ...

    jakarta.annotation-api-1.3.5-API文档-中文版.zip

    赠送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...

    apache-tomcat-7.0.69.zip

    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689) at org.springframework.web.servlet.mvc.method....

    springboot 基础简易实例, maven项目

    import org.springframework.context.annotation.ComponentScan; @SpringBootApplication @ComponentScan(basePackages = {"com.example.*"}) //指定扫描包路径 public class DemoApplication { public static void ...

    SpringBootTestApplication

    import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @SpringBootApplication public class MainApplication { public static ...

    redis-lock-master.zip

    import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import java....

    Spring In Action-2.1-01-@Component注解

    import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @...

Global site tag (gtag.js) - Google Analytics