当前位置: 动力学知识库 > 问答 > 编程问答 >

dependency injection - spring ioc and JSR168 Portlets

问题描述:

Is it possible to do dependency injection using spring into a jsr168 Portlet?

网友答案:

Yes - have a look at the portlet chapter in the spring reference.

Notice that you need to implement the special spring portlet controller interface, and not the standard portlet. These controller as well as the injected beans should be in the spring context file specified in the contextConfigLocation parameter. I guess that the usual applicationContext.xml will work as well (if you register the spring servlet context listener)

分享给朋友:
您可能感兴趣的文章:
随机阅读: