1,前言
旧工程(jdk 6.0,Tomcat 6.0):Spring MVC 3.1.0,Hibernate 4.0.1,Spring Data Jpa 1.5.3,solrj 4.7.2
改造后的工程(jdk 8.0,Tomcat 8.5):Spring MVC 4.3.8,Hibernate 5.2.10,Spring Data Jpa 1.11.3,solrj 6.5.0,jedis 2.9.0
2,升级前后差异对比
项 | 升级 | 对比 |
Spring MVC框架 | 3.1.0→4.3.8 | ①asm移入到core中 ②web包有调整(详细略) 配置项: ③json转换器从 MappingJacksonHttpMessageConverter→ MappingJackson2HttpMessageConverter ④CRON表达式触发器从 CronTriggerBean→ CronTriggerFactoryBean |
Hibernate | 4.0.1→5.2.10 | persistence.xml中的提供者<provider>从 org.hibernate.ejb.HibernatePersistence→ org.hibernate.jpa.HibernatePersistenceProvider |
Quartz | 1.8.6→2.2.3 | CRON表达式触发器从(spring context support) CronTriggerBean→ CronTriggerFactoryBean |
solrj | 4.7.2→6 .5.0 | ①查询用连接的构造从 HttpSolrServer→ HttpSolrClient→ HttpSolrClient.Builder ②更新用连接的构造从 ConcurrentUpdateSolrServer→ ConcurrentUpdateSolrClient→ ConcurrentUpdateSolrClient.Builder |
jedis | 2.7.2→2.9.0 | 释放连接资源的方法从 returnResource→close |