Explorar el Código

增加static静态目录与web访问路径配置

luoshi hace 5 años
padre
commit
7f34fc41b8

+ 1 - 1
src/main/java/com/qmth/ops/aliyun/utils/SlsService.java

@@ -3,7 +3,6 @@ package com.qmth.ops.aliyun.utils;
 import com.alibaba.fastjson.JSONObject;
 import com.aliyuncs.sts.model.v20150401.AssumeRoleResponse;
 import com.qmth.ops.aliyun.config.SlsConfig;
-import com.sun.deploy.net.URLEncoder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.core.io.ClassPathResource;
@@ -16,6 +15,7 @@ import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
 import java.text.MessageFormat;
 import java.util.ArrayList;

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

@@ -1,5 +1,7 @@
 server.port=8080
 
+spring.webflux.static-path-pattern=/web/**
+spring.resources.static-locations=classpath:/static
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
 spring.jackson.time-zone=GMT+8
 

+ 1 - 0
src/main/resources/static/index.html

@@ -0,0 +1 @@
+hello