Announcement Announcement Module
Collapse
No announcement yet.
Creating an add-on with a controller Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating an add-on with a controller

    I'd like to reuse a controller across multiple Roo projects. Add-on seems to be the way to do, but I did not find any exemple of having a controller in an Add-on. Is it possible, is it the right way of doing it ?

  • #2
    I found the solution. In fact add-ons are not made for this. The way to go is just packaging my controller as a jar.

    After, I just need to add the dependency to the pom.xml and edit the web-mvc.xml to add :

    Code:
        <context:component-scan base-package="org.exoplatform.spring.monitoring" use-default-filters="false">
    		<context:include-filter expression="org.springframework.stereotype.Controller" type="annotation"/>
    	</context:component-scan>
    The only use of creating an add-on would be to have a command to install this into a roo project.

    Comment

    Working...
    X