0

I study for maintain an old web-app (Spring 2.5, Java/JDK 1.6, Eclipse IDE 2022-06, Windows 10 x64).

Learned from tutorial https://mkyong.com/spring-mvc/spring-mvc-jquery-autocomplete-example/

File mvc-dispatcher-servlet.xml

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans     
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
        http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context-3.0.xsd">

    <context:component-scan base-package="com.mkyong" />
    <bean
        class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix">
            <value>/WEB-INF/pages/</value>
        </property>
        <property name="suffix">
            <value>.jsp</value>
        </property>
    </bean>
    
    <mvc:resources mapping="/resources/**" location="/resources/" />

    <mvc:annotation-driven />

</beans>

I need convert this web-app (Spring 3.0) to Spring 2.5, how to revise? What is the same of Spring 3.0's mvc:annotation-driven in Spring 2.5?

Vy Do
  • 46,709
  • 59
  • 215
  • 313
  • I would strongly suggest to upgrade to Spring 5.3 (at least) as that is still supported. YOu don't want to use a version that is very old and has known security flaws etc. That being said I [here](https://docs.spring.io/spring-framework/docs/2.5.6/reference/mvc.html#mvc-annotation) are the annotation driven docs for Spring 2.5. – M. Deinum Jan 05 '23 at 09:58

0 Answers0