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 | 29 | 30 | 31 |
Tags
- QueryDSL
- 스프링 핵심 기능
- Servlet
- Thymeleaf
- AOP
- transaction
- 인프런
- pointcut
- spring
- 김영한
- Spring Boot
- 알고리즘
- Exception
- Android
- java
- Greedy
- 백준
- http
- kotlin
- springdatajpa
- 스프링
- jpa
- 자바
- SpringBoot
- 스프링 핵심 원리
- JPQL
- Proxy
- 그리디
- JDBC
- db
Archives
- Today
- Total
목록required=false (1)
개발자되기 프로젝트
@Autowired 옵션처리
1. 주입할 스프링 빈이 없어도 동작해야 할 경우도 있다. 주입할 스프링 빈이 없어도 동작해야 할 경우도 있다. @Autowired(required = false)로 지정하는 경우, 자동 주입할 대상이 없으면 수정자 메서드 호출 안됨. @Nullable : 자동 주입할 대상이 없으면 null 입력됨. Optional : 자동 주입할 대상이 없으면 Optional.empty가 입력됨. public class AutowiredTest { @Test void AutowiredOption(){ ApplicationContext ac = new AnnotationConfigApplicationContext(TestBean.class); } static class TestBean{ @Autowired(require..
인프런/[인프런] Spring 핵심원리 이해
2021. 7. 29. 22:32