How to upgrade ALL the spring dependency?

后端 未结 4 1723
情话喂你
情话喂你 2021-02-06 19:54

I have a spring-webmvc based web application. It used the org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer which is not

4条回答
  •  借酒劲吻你
    2021-02-06 20:21

    You should move from a hardcoded version of a spring version inside a pom.xml to a property, e.g.

    inside your properties

     4.0.2.RELEASE
    

    inside your dependencies

    
    
        org.springframework
        spring-core
        ${springframework.version}
    
    
        org.springframework
        spring-expression
        ${springframework.version}
    
    
        org.springframework
        spring-beans
        ${springframework.version}
    
    
        org.springframework
        spring-aop
        ${springframework.version}
    
    
        org.springframework
        spring-context
        ${springframework.version}
    
    
        org.springframework
        spring-context-support
        ${springframework.version}
    
    
        org.springframework
        spring-web
        ${springframework.version}
    
    
        org.springframework
        spring-orm
        ${springframework.version}
    
    
        org.springframework
        spring-webmvc
        ${springframework.version}
    
    
    
        org.springframework.security
        spring-security-config
        ${springframework.security.version}
    
    
        org.springframework.security
        spring-security-core
        ${springframework.security.version}
    
    
        org.springframework.security
        spring-security-web
        ${springframework.security.version}
    
    

    with this setup its easy to migrate the versions, the listed deps are just copy/paste, don't take it for granted, use what you need

提交回复
热议问题