CGLIB is required to process @Configuration classes
Incase if you are using @Configuration annotation to create java based configuration as shown below:
@Configuration
public class MyAppConfig {
@Bean(name="helloBean")
public HelloWorld helloWorld()
{
return new HelloWorldImpl();
}
}
|
And if you are getting below exception, then check your maven dependencies and make sure you have added cglib dependencies
in your pom.xml.
Exception in thread "main" java.lang.IllegalStateException: CGLIB is required to process
@Configuration classes. Either add CGLIB to the classpath or remove the following
@Configuration bean definitions: [appConfig]
|
If not, add below dependency in your pom.xml file, which will solve your problem.
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>3.0</version>
</dependency>
|
|