Hi,
In order for AppFuse new release to be compatible with 2.0.2, I guess we
need to put the following in the xml config file:

<bean id="urlMapping"
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
        <property name="mappings">
            <value>
                /admin/activeUsers.html=filenameController
                /admin/flushCache.html=filenameController
                /admin/reload.html=reloadController
                /admin/users.html=userController
                /mainMenu.html=filenameController
                /passwordHint.html=passwordHintController
            </value>
        </property>
        <property name="order" value="0"/> 
    </bean>

<bean
class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping">
        <property name="order" value="1"/>
</bean>

<context:component-scan base-package="my.base.package"/>

<bean
class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping”
/>

I tried without DefaultAnnotationHandlerMapping, but the @RequestMapping
annotation was not picked up.

--Irshad.


dirkdk wrote:
> 
> I like the annotations a lot, especially for spring-mvc. The @Controller,
> @ModelAttribute and  @RequestMapping annotation make life a lot easier
> 
> One thing I was banging my head against the wall for, was to get the
> @RequestMapping to work. It turned out that if you are also using a
> SimpleUrlHandlerMapping for configuring request mappings in XML you need
> to configure _also_ a DefaultAnnotationHandlerMapping.
> 
> Something to think about when you start migrating projects but want to
> keep the old code and configuration and only want to write new stuff using
> annotations
> 
> 
> 
> 
> 
> mraible wrote:
>> 
>> All,
>> 
>> I did a spike last night trying to move AppFuse's backend from XML to
>> annotations. I wrote up a blog post on my experience.
>> 
>> http://tinyurl.com/5kqcqa
>> 
>> Please let me know if you have any solutions to the problems I
>> encountered. Furthermore, please let me know if you any questions on
>> this change.
>> 
>> Thanks,
>> 
>> Matt
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Moving-from-Spring%27s-XML-to-Annotations-tp20328900s2369p20555114.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to