This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. « FrontPage に戻る
Adding Spring Capabilitites to Hook
Community-Releases: Liferay Portal 6.1 CE GA2 (6.1.1)
create a file service.properties in docroot/WEB-INF/src with the following content:
[code]
include-and-override=${base.path}/service-ext.properties
spring.configs=WEB-INF/classes/META-INF/ext-spring.xml
[/code]
create the file:docroot/WEB-INF/src/META-INF/ext-spring.xml
In this file, you can now add your beans which you want to be handled by Spring.
Some more advice:
We did this to enhance the funcionality of the DynamicDataList-portlet of Liferay. We wanted to have access to some additional custom classes, which we wrote ourself. To get access to the Bean in the Velocity templates, we needed to get the bean from the Hook-portlet, so we had to get the bean from the portletClassLoader.
51515 参照数