본문 바로가기

SPRING8

[SPRIING] component-scan 사용법 (available: expected at least 1 bean which qualifies as autowire candidate. 에러) expected at least 1 bean which qualifies as autowire candidate. => autowire 할 bean이 최소 1개는 필요하다. 스프링을 설정하며 발생했던 오류다. - 클래스에 어노테이션 확인 오류 내용 처럼 Autowired를 할 수 없다는 오류이고, 클래스에 @Autowired, @Service, @Repository가 잘 붙었나 봐야한다! - dispatcher servlet 의 base-package 경로 확인 내 경우엔 이거였다! component-scan의 base-package 경로가 잘못되어있어 수정해 주니 바로 해결됐다. 에러를 해결하며 component-scan에 대해 알아봤고 component-scan 개념에 대해 정리해본다! - compo.. 2022. 3. 31.
[SPRING] MyBatis mapper.xml 수정시 서버 재시작없이 반영하기 MyBais를 사용할때 mapper.xml에서 쿼리를 바꾸고 적용시키려면 서버를 재시작 시켜야하는 부분이 번거롭다. 서버를 재시작하지않고 수정된 쿼리를 적용시키는 방법을 알아보자! - RefreshableSqlSessionFactoryBean.java import java.io.IOException; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Time.. 2022. 3. 28.
[SPRING SECURITY] BCryptPasswordEncoder 비밀번호 암호화 테스트 환경: 전자정부프레임워크 3.7 / SPRING 4.2.4 1. pom.xml 에 spring security dependency 추가 org.springframework.security spring-security-web 4.2.3.RELEASE org.springframework.security spring-security-core 4.2.3.RELEASE org.springframework.security spring-security-config 4.2.3.RELEASE 2. 암호화를 위해 context.xml 에 bean 객체 생성 3. @Autowired BCryptPasswordEncoder @Autowired BCryptPasswordEncoder passwordEncoder; 4. .. 2022. 2. 4.
반응형