Tag Archives: spring

Sitemap components in Cocoon 2.2

For the cocoon 2.1 project I did last year, I wrote a few components in Java (mostly Generators and one InputModule). It’s a bit of a pain because it’s built on the out-of-date and intrusive avalon framework. Anyway the end result is that you can write things in your cocoon sitemap like:

[...]

Bootstrapping Spring

Recently, I’ve been converting a project to use Spring. My main method looks something like this.

ApplicationContext context = new ClassPathXmlApplicationContext("context.xml");
Main main = (Main) context.getBean("main");
main.run();

There’s a problem though. Several of my beans need to be configurable. Normally, I’d resolve this by using a PropertyPlaceholderConfigurer (or more likely [...]