Today I spent some interesting time debugging my application, where I had Spring 3, Spring MVC and Spring BlazeDS integration working together in one web application. Web controllers were defined with annotations as introduced in Spring 2.5 in one servlet and BlazeDS handled calls from Flex frontend in it’s own servlet. However while setting everything up I had made a really simple mistake by including Spring Flex configuration into applicationContext – not into messagebroker servlet, which had everything else related to the BlazeDs-messagebroker.
I hadn’t worked with my MVC-controllers for some time as I had been focused on working with Flex and got a nasty surprise, when I tried them out again. As I tried to access my controllers via browser, I got strange errors about handler’s not having controller interface defined. Naturally I thought that I had somehow broken my annotation based configuration, but after doing diffs and numerous tests I couldn’t figure out what was wrong.
Not until I started to remove components away from the configuration I got to the solution and figured out that I had made just a stupid mistake in configurations.
Read through how it is supposed to be done:
Well. Not going to make that mistake again.