In this section we will learn about Spring cglib library and understand the importance of it. You will also find the url to download cglib library
What is cglib?
The cglib is high performance library in Java. It is used to extend Java classes and implement interfaces in runtime. It is one the best quality code generation library available in Java. The latest version of cglib library can be downloaded from http://cglib.sourceforge.net/.
The cglib library is free software and can be used for personal and commercial purposes.
Spring 3 framework uses cglib2 for manipulating the Java classes in runtime. The cglib library is not included in Spring 3.0 distribution. So, you have to manually download and include in your project.
On the cglib home page you will find the link to download.
If you don't include the cglib dependency in your Spring 3 project you might get the following error:
Jan 2, 2010 3:22:07 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
startup date [Sat Jan 02 15:22:07 IST 2010]; root of context hierarchy
Exception in thread "main"java.lang.IllegalStateException: CGLIB is required to process @Configuration classes.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.