Spring 3.1

Encrypting config files with Spring 3.1 and jasypt

I’ve been working on a project that at one point needed encrypted configuration files. The JASYPT library provides a very nice tie-in with Spring. There were some pieces I had to put together, so here are the results of my @Configuration file that handles encryption. It will scan a given directory (specified by the VM argument config.dir) for any .properties files, and uses JASYPT to […]

Encrypting config files with Spring 3.1 and jasypt Continue Reading »

Full Spring 3.1 Config

Someone asked for my full Spring 3.1 annotation configuration. I’ve stripped all domain-specific information, but the overall structure is intact. SpringConfig.java – this is the top level class, is empty except for @ComponentScan and @Import statements. The web.xml references this. SpringMvcConfiguration – Any MVC related configuration DatabaseConfiguration @Configuration
@ComponentScan(basePackageClasses = { SpringConfig.class})
@Import({ SpringMvcConfiguration.class, DatabaseConfiguration.class})
public class SpringConfig {

}
 @Configuration
@EnableWebMvc
@Import({ MvcComponents.class,BeanConfiguration.class })
public class SpringMvcConfiguration extends WebMvcConfigurerAdapter {
 @Qualifier(“generalMapper”)


Full Spring 3.1 Config Continue Reading »

Spring 3.1, No-XML, Hibernate, Cglib, and PermGen errors

Lately I have been maintaining several Spring-MVC applications written from the ground up with Spring 3.1. They use the purely Java based configuration scheme that comes in version 3.1, Hibernate. The apps do not have the pattern of “an interface for every class” that some Spring apps have, so it proxies concrete classes using Cglib. When the apps are deployed to Tomcat, we do a

Spring 3.1, No-XML, Hibernate, Cglib, and PermGen errors Continue Reading »