1.spring框架版本升级
<spring.version>5.2.1.RELEASE</spring.version>
会报错:
o.s.web.context.support.XmlWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]:
Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException
原因是:spring和jackson相关版本不兼容
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.1</version>
</dependency>
2.其他工具包升级
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.5.3</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>2.0.3</version>
</dependency>
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.5.4</version>
</dependency>
3.redis升级出现很多错误
表明redis版本进行了较大改动,考虑修改成本,以及本项目所使用的是简单的redis功能,就不进行升级
4.企业升级主要步骤
- step1.在本地或者开发环境尝试升级,确保功能正常(开发过程中的测试用例)
- step2.提交改动到线上代码库,由QA进行各项测试,包括功能和性能
- step3.灰度发布,即逐步上线(一组一组服务器进行上线)
- step4.全量上线
网友评论