Explorar el Código

update to springboot v1.5.14

deason hace 7 años
padre
commit
9a3ac8565b

+ 1 - 5
pom.xml

@@ -10,7 +10,7 @@
     <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
-        <version>2.0.3.RELEASE</version>
+        <version>1.5.14.RELEASE</version>
     </parent>
 
     <properties>
@@ -108,10 +108,6 @@
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-data-redis</artifactId>
         </dependency>
-        <!--<dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-actuator</artifactId>
-        </dependency>-->
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>

+ 1 - 1
src/main/java/cn/com/qmth/examcloud/app/ApiApplication.java

@@ -10,7 +10,7 @@ package cn.com.qmth.examcloud.app;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+import org.springframework.boot.web.support.SpringBootServletInitializer;
 import org.springframework.scheduling.annotation.EnableAsync;
 
 @EnableAsync

+ 2 - 2
src/main/java/cn/com/qmth/examcloud/app/core/config/InterceptorConfig.java

@@ -10,10 +10,10 @@ package cn.com.qmth.examcloud.app.core.config;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 
 @Configuration
-public class InterceptorConfig implements WebMvcConfigurer {
+public class InterceptorConfig extends WebMvcConfigurerAdapter {
 
     @Bean
     public AccessInterceptor accessInterceptor() {

+ 3 - 3
src/main/java/cn/com/qmth/examcloud/app/service/DeviceRecordService.java

@@ -7,9 +7,9 @@
 
 package cn.com.qmth.examcloud.app.service;
 
+import cn.com.qmth.examcloud.app.dao.DeviceRecordRepository;
 import cn.com.qmth.examcloud.app.model.DeviceRecord;
 import cn.com.qmth.examcloud.app.model.Result;
-import cn.com.qmth.examcloud.app.dao.DeviceRecordRepository;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -95,8 +95,8 @@ public class DeviceRecordService {
         }
         if (pageNo < 1) pageNo = 1;
         if (pageSize < 1) pageSize = 1;
-        Sort sort = Sort.by(Sort.Direction.DESC, "id");
-        Pageable pageable = PageRequest.of(pageNo - 1, pageSize, sort);
+        Sort sort = new Sort(Sort.Direction.DESC, "id");
+        Pageable pageable = new PageRequest(pageNo - 1, pageSize, sort);
         Page<DeviceRecord> page = deviceRecordRepository.findAll(spec, pageable);
         return new Result<>().success(page);
     }

+ 2 - 2
src/main/resources/application-dev.properties

@@ -1,6 +1,6 @@
 # mvc config
 server.port=8090
-server.servlet.context-path=/
+server.context-path=/
 server.tomcat.uri-encoding=UTF-8
 spring.freemarker.request-context-attribute=request
 spring.freemarker.settings.number_format=#
@@ -24,7 +24,7 @@ spring.redis.port=6379
 spring.redis.host=192.168.10.30
 spring.redis.password=
 spring.redis.database=0
-spring.redis.timeout=PT15S
+spring.redis.timeout=15000
 # 蕉昢督昢華硊
 examcloud.exam.admin.url=http://192.168.10.30:8001
 # 厙蕉督昢華硊

+ 2 - 2
src/main/resources/application-prod.properties

@@ -1,6 +1,6 @@
 # mvc config
 server.port=8090
-server.servlet.context-path=/
+server.context-path=/
 server.tomcat.uri-encoding=UTF-8
 spring.freemarker.request-context-attribute=request
 spring.freemarker.settings.number_format=#
@@ -24,7 +24,7 @@ spring.redis.port=6379
 spring.redis.host=192.168.10.30
 spring.redis.password=
 spring.redis.database=0
-spring.redis.timeout=PT15S
+spring.redis.timeout=15000
 # 蕉昢督昢華硊
 examcloud.exam.admin.url=http://192.168.10.30:8001
 # 厙蕉督昢華硊

+ 2 - 2
src/main/resources/application-test.properties

@@ -1,6 +1,6 @@
 # mvc config
 server.port=8090
-server.servlet.context-path=/
+server.context-path=/
 server.tomcat.uri-encoding=UTF-8
 spring.freemarker.request-context-attribute=request
 spring.freemarker.settings.number_format=#
@@ -24,7 +24,7 @@ spring.redis.port=6379
 spring.redis.host=192.168.10.30
 spring.redis.password=
 spring.redis.database=0
-spring.redis.timeout=PT15S
+spring.redis.timeout=15000
 # 蕉昢督昢華硊
 examcloud.exam.admin.url=http://192.168.10.30:8001
 # 厙蕉督昢華硊

+ 0 - 1
src/main/resources/application.properties

@@ -1,3 +1,2 @@
 #debug=true
-#management.endpoints.web.exposure.include=*
 spring.profiles.active=dev