일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- jpa
- 그리디
- pointcut
- transaction
- http
- AOP
- Android
- 백준
- JPQL
- spring
- JDBC
- Spring Boot
- Servlet
- 스프링 핵심 기능
- 알고리즘
- java
- 김영한
- Greedy
- QueryDSL
- db
- Proxy
- 스프링 핵심 원리
- 자바
- SpringBoot
- 스프링
- Thymeleaf
- 인프런
- springdatajpa
- Exception
- kotlin
- Today
- Total
목록@Configuration (2)
개발자되기 프로젝트
WebApplication에 적용해보자. 1. Formmater 등록 addFormatters()를 사용하면됨. @Configuration public class WebConfig implements WebMvcConfigurer { @Override public void addFormatters(FormatterRegistry registry) { //StingInteger는 아래forammter에서 지원. converter가 우선순위 높음. //registry.addConverter(new StringToIntegerConverter()); registry.addConverter(new StringToIpPortConverter()); //registry.addConverter(new IntegerT..
1. AppConfig에서 method호출할 때 마다 인스턴스가 생성? 기존에 작성한 AppConfig를 보면 memberRepository를 두 번 호출한다. 그러면 MemoryMemberRepository가 두 번 생성되나???? 엥? 싱글톤인데??? 깨지나??? 스프링 컨테이너는 싱글톤 보장해준다고 했는데..? 2. 그러면 두 클래스에 들어가는 memberRepository가 같은지 보자. public class ConfigurationSingletonTest { @Test void configurationTest(){ AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(AppConfig.class); Memb..