Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Greedy
- Exception
- QueryDSL
- JPQL
- 그리디
- Proxy
- db
- 알고리즘
- kotlin
- spring
- transaction
- Android
- 스프링 핵심 기능
- Spring Boot
- springdatajpa
- java
- AOP
- jpa
- 자바
- pointcut
- SpringBoot
- 백준
- Thymeleaf
- JDBC
- 스프링
- http
- 인프런
- 스프링 핵심 원리
- 김영한
- Servlet
Archives
- Today
- Total
목록NoUniqueDefinitionException (1)
개발자되기 프로젝트
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bhclfs/btrax7I7XlU/oPdFjkpQzWyhQS9BjsaFC1/img.png)
1. 클래스로 빈을 찾았는데 같은 타입의 빈이 여러개면??? 이름을 지정해주면 된다 ㅋㅋ as.getBeansOfType()사용하면 해당 타입의 모든 빈 조회가능 중복상황을 만들어 주기 위해 내부 클래스에 SameBeanConfig를 만들어주었다. 만약 클래스로 찾았는데 중복된다면 NoUniqueDefinitionException이 발생한다. public class ApplicationContextSameBeanFindTest { AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(SameBeanConfig.class); @Test @DisplayName("타입으로 조회 시 같은 타입이 둘 이상 있으면, 중복 오류가..
인프런/[인프런] Spring 핵심원리 이해
2021. 7. 26. 21:11