본문 바로가기

프로그래밍/SPRING 3.X

CGLIB is required to process @Configuration classes. Either add CGLIB to the classpath or remove the following @Configuration bean definitions

스프링에서 자바 코드에 의한 빈 등록: @Configuration클래스의 @Bean메소드를 테스트 하다가 

아래와 같은 오류가 나올수 있다. 

CGLIB is required to process @Configuration classes. Either add CGLIB to the classpath or remove the following @Configuration bean definitions


이럴때는 아래와 같이 등록 해줘야 한다.(버전은 알아서..)

<dependency> <groupId>cglib</groupId> <artifactId>cglib</artifactId> <version>2.2.2</version> </dependency>