Saturday, October 20, 2007

Correcting error in previous post

Ok, I noticed that I posted some information in the Grails to the test... post that was not correct.
I said that, in my Grails project I had to use the applicationContext.xml instead of the resources.xml to get my existing spring beans working. This is not correct. It worked like that back then but apparently this is not how it should be.
From what I understand you really shouldn't use the applicationContext.xml file for your own custom stuff. This is used by Grails to set up some default stuff.
I just upgraded to the latest Grails version which is 1.0-RC1 (I'm using Groovy version 1.1-RC1 btw) and noticed that it works fine in resources.xml indeed.
I'll do an update on my findings during the project real soon.

What I also noticed in the new version and that was especially nice, is that the PropertyPlaceholderConfigurer bug is solved too. Before the properties in spring files were not replaced when a war'red application was run inside an appserver.
I believe that the problem had to do with the PropertyPlaceholderConfigurer kicking in too late - after bean initialization.
Anyway I can build a great working war file now - great stuff, you Grails guys!

No comments: