Announcement Announcement Module
Collapse
No announcement yet.
Using attributes to minimize MVC web tier configuration??? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using attributes to minimize MVC web tier configuration???

    Does any have this working?

    I have a controller named SimpleController that extends AbstractController and has the following attribute @@org.springframework.web.servlet.handler.metadata .PathMap("/SampleWebApplication/hello.do")

    I also have the following bean definition in my xxxx-servlet.xml file:
    <bean id="commonsAttributesHandlerMapping" class="org.springframework.web.servlet.handler.met adata.CommonsPathMapHandlerMapping" />

    I run my Ant build script and do my attribute-compiler task then compile everything included what was generated by the attribute. After compilation I jar up my application and run the Ant task attribute-indexer on my jar. It modifies my Jar and adds a file called attrs.index. The file contains one line with the following info: Class: org.ghc.spring.controllers.SimpleController

    So when I load my Spring application I see the following in the log:
    - Creating shared instance of singleton bean 'commonsAttributesHandlerMapping'
    - Found 0 attribute-targeted handlers

    What am I doing wrong???

    Thanks in advance,

    Jeff

  • #2
    Ant Script

    Hi, I add the same problem. Here is a snippet of my Ant script.
    <target name="compile-attributes">
    <attribute-compiler destdir="${src.dir}">
    <fileset dir = "${src.dir}" includes="**/*.java"/>
    </attribute-compiler>
    </target>

    Make sure you have the **/*.java in your ant build file, this should resolve your issue.

    Thanks,


    Simon

    Comment

    Working...
    X