Liferay: Líder no Quadrante Mágico da Gartner pelo sexto ano consecutivo! Leia mais aqui
« Voltar para FrontPage

Adding Spring Capabilitites to Hook

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.

0 Anexos
40111 Visualizações
Média (1 Votar)
A média da avaliação é 5.0 estrelas de 5.
Comentários