Browse Source

询价列表接口方法修改

dongbw 6 years ago
parent
commit
22fb94f39a

+ 7 - 11
pom.xml

@@ -9,6 +9,13 @@
     <artifactId>ps-inquiry</artifactId>
     <packaging>jar</packaging>
 
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+    </properties>
+
     <dependencies>
 
         <dependency>
@@ -125,17 +132,6 @@
             <scope>test</scope>
         </dependency>
 
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-cache</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.github.ben-manes.caffeine</groupId>
-            <artifactId>caffeine</artifactId>
-            <version>2.6.2</version>
-        </dependency>
-
 
     </dependencies>
 

+ 0 - 2
src/main/java/com/uas/ps/inquiry/Application.java

@@ -4,7 +4,6 @@ import com.uas.ps.core.util.ContextUtils;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.context.event.ApplicationPreparedEvent;
-import org.springframework.cache.annotation.EnableCaching;
 import org.springframework.context.ApplicationListener;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
@@ -23,7 +22,6 @@ import java.io.FileNotFoundException;
 @SpringBootApplication(scanBasePackages = "com.uas.ps.inquiry")
 @EnableWebMvc
 @EnableScheduling
-@EnableCaching
 //@EnableSSO
 public class Application {
     public static void main(String[] args) throws FileNotFoundException {

+ 0 - 19
src/main/java/com/uas/ps/inquiry/config/CaffeineConfig.java

@@ -1,19 +0,0 @@
-package com.uas.ps.inquiry.config;
-
-import com.github.benmanes.caffeine.cache.CacheLoader;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-
-/**
- * @author liuam
- * @since 2018/11/7 0007 下午 16:32
- */
-@Configuration
-public class CaffeineConfig {
-    @Bean
-    public CacheLoader<Object, Object> cacheLoader() {
-        CacheLoader<Object, Object> cacheLoader = (key) -> null;
-        return cacheLoader;
-    }
-}

+ 0 - 3
src/main/java/com/uas/ps/inquiry/controller/PublicInquiryController.java

@@ -21,7 +21,6 @@ import com.uas.ps.inquiry.service.PublicInquiryService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cache.annotation.Cacheable;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Sort;
 import org.springframework.ui.ModelMap;
@@ -67,7 +66,6 @@ public class PublicInquiryController {
      * @date 2018-01-17 10:27
      */
     @RequestMapping(method = RequestMethod.GET)
-    @Cacheable(value="inquiry_public", key = "#pageInfo.getPageNumber() + '-' + #pageInfo.getPageSize() + '-' + #searchFilter.toString()")
     public IPage<PurcInquiryItemInfo> getInquiry(PageInfo pageInfo, SearchFilter searchFilter, String distributes) {
         long start = System.currentTimeMillis();
         log.info("/inquiry/public, 查询公共询价信息, pageInfo: {}, searchFilter: {}, distributes: {}", JSON.toJSON(pageInfo), JSON.toJSON(searchFilter), distributes);
@@ -325,7 +323,6 @@ public class PublicInquiryController {
      * @return
      */
     @RequestMapping(value = "/getCountOfLastAndThisMonth", method = RequestMethod.GET)
-    @Cacheable(value="count_of_nearly_two_months", key = "targetClass + methodName")
     public ModelMap getCountOfLastAndThisMonth() {
         long start = System.currentTimeMillis();
         ModelMap map = publicInquiryService.getCountOfLastAndThisMonth();

+ 0 - 6
src/main/resources/config/application-dev.properties

@@ -53,12 +53,6 @@ http.syncConnectionRequestTimeout=3000
 http.syncConnectPerRoute=50
 http.syncConnectNum=50
 
-#spring.cache.cache-names=inquiry_public
-spring.cache.caffeine.spec=maximumSize=1000,refreshAfterWrite=60s
-
-logging.level.org.springframework.jdbc=debug
-logging.level.org.springframework.cache=debug
-
 server.tomcat.max-connections=10000
 server.tomcat.max-threads=200
 server.tomcat.accept-count=10000