Results 1 to 2 of 2

Thread: Using attributes to minimize MVC web tier configuration???

  1. #1
    Join Date
    Nov 2004
    Location
    Seattle, WA
    Posts
    4

    Default 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. #2
    Join Date
    Sep 2005
    Location
    Cardiff
    Posts
    3

    Default 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
    ook ook you ready to go ape

Similar Threads

  1. MethodSecurityInterceptor not working?
    By asarco in forum Security
    Replies: 14
    Last Post: Mar 31st, 2008, 09:59 AM
  2. Dynamic Property Configuration
    By fenrick in forum Container
    Replies: 3
    Last Post: May 12th, 2006, 02:38 AM
  3. Replies: 2
    Last Post: Oct 10th, 2005, 05:12 PM
  4. Replies: 8
    Last Post: Dec 7th, 2004, 06:13 PM
  5. Replies: 5
    Last Post: Aug 27th, 2004, 07:13 PM

Posting Permissions

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