Results 1 to 2 of 2

Thread: Creating an add-on with a controller

Hybrid View

  1. #1
    Join Date
    Jul 2010
    Posts
    6

    Default 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. #2
    Join Date
    Jul 2010
    Posts
    6

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •