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
- 자바
- http
- AOP
- Thymeleaf
- java
- 김영한
- 인프런
- pointcut
- spring
- springdatajpa
- 그리디
- kotlin
- jpa
- db
- Greedy
- Servlet
- 알고리즘
- JPQL
- QueryDSL
- JDBC
- 스프링 핵심 원리
- 스프링 핵심 기능
- 스프링
- Exception
- SpringBoot
- Spring Boot
- Android
- Proxy
- transaction
- 백준
Archives
- Today
- Total
목록spring bean (1)
개발자되기 프로젝트
Spring Bean과 의존관계(JAVA로 직접 등록)
@Component, @Autowired을 사용하는 방법 외에도 스프링 빈으로 등록하는 다른 방법은 java로 직접 등록해주는 것이다. 1. SpringConfig class 간단하다! SpringConfig class를 만들고 아래와 같이 @Bean으로 등록해주면 된다. @Controller는 그대로 두고, @Service, @Repository는 삭제한 상태이다. @Configuration public class SpringConfig { @Bean public MemberService memberService(){ return new MemberService(memberRepository()); } @Bean public MemberRepository memberRepository(){ return..
Spring Boot
2021. 7. 22. 22:24