Grails dependency injection no longer working after upgrade to Grails 1.3.3

妖精的绣舞 提交于 2019-12-11 12:14:23

问题


Project setup is Flex 3-BlazeDS-Spring Flex Integration-Grails

Dependency injection in my Service classes was working just fine with Grails 1.2.1, when service methods were called from my flex client.

When I upgraded my project to 1.3.3 yesterday using the regular 'grails upgrade' command, everything went well but once I started the app, dependency injection no longer seems to work in my Grails Service classes. I did not change the BlazeDS nor Spring Integration setup.

When I call the exact same Service method from a Grails controller (using 1.3.3), dependancies are injected.

Did anyone had the same problem and know the solution to this?

Update/temp solution:

Additional tests point out that services are no longer exposed to BlazeDS when using the @RemotingDestination annotation in Grails 1.3. Adding @Service("someServiceClass"), as stated in the comment below, solved the exposure but broke the grails dependency injection mechanism.

Explicitly defining the remoting-destinations in the flex-servlet.xml 'solves' the problem. Services are exposed and grails stuff works again. Well it´s more a temporary workaround.

<flex:remoting-destination ref="serviceName" />  

来源:https://stackoverflow.com/questions/3432650/grails-dependency-injection-no-longer-working-after-upgrade-to-grails-1-3-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!