浏览代码

maven 编译环境 1.7->1.8

liuam 7 年之前
父节点
当前提交
87f0748b7b
共有 2 个文件被更改,包括 9 次插入6 次删除
  1. 7 0
      pom.xml
  2. 2 6
      src/main/java/com/uas/ps/inquiry/config/CaffeineConfig.java

+ 7 - 0
pom.xml

@@ -145,6 +145,13 @@
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
             </plugin>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>

+ 2 - 6
src/main/java/com/uas/ps/inquiry/config/CaffeineConfig.java

@@ -4,6 +4,7 @@ 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
@@ -12,12 +13,7 @@ import org.springframework.context.annotation.Configuration;
 public class CaffeineConfig {
     @Bean
     public CacheLoader<Object, Object> cacheLoader() {
-        CacheLoader<Object, Object> cacheLoader = new CacheLoader<Object, Object>() {
-            @Override
-            public Object load(Object key) throws Exception {
-                return null;
-            }
-        };
+        CacheLoader<Object, Object> cacheLoader = (key) -> null;
         return cacheLoader;
     }
 }