提交 24587780 authored 作者: 张航's avatar 张航

修改了部分信息

上级 8fe201d7
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<description>Simple download map zone.</description> <description>Simple download map zone.</description>
<packaging>jar</packaging> <packaging>jar</packaging>
<properties> <properties>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<!-- 跳过测试 --> <!-- 跳过测试 -->
...@@ -27,17 +28,17 @@ ...@@ -27,17 +28,17 @@
<artifactId>spring-boot-starter</artifactId> <artifactId>spring-boot-starter</artifactId>
</dependency> </dependency>
<dependency> <!--<dependency>-->
<groupId>org.springframework.boot</groupId> <!--<groupId>org.springframework.boot</groupId>-->
<artifactId>spring-boot-starter-test</artifactId> <!--<artifactId>spring-boot-starter-test</artifactId>-->
<scope>test</scope> <!--<scope>test</scope>-->
<exclusions> <!--<exclusions>-->
<exclusion> <!--<exclusion>-->
<groupId>org.junit.vintage</groupId> <!--<groupId>org.junit.vintage</groupId>-->
<artifactId>junit-vintage-engine</artifactId> <!--<artifactId>junit-vintage-engine</artifactId>-->
</exclusion> <!--</exclusion>-->
</exclusions> <!--</exclusions>-->
</dependency> <!--</dependency>-->
<!-- websocket --> <!-- websocket -->
<dependency> <dependency>
......
package com.comleader.ldmapdownload; package com.comleader.ldmapdownload;
import com.comleader.ldmapdownload.config.WebSocketConfig;
import com.comleader.ldmapdownload.socket.DownLoadMapWebSocket; import com.comleader.ldmapdownload.socket.DownLoadMapWebSocket;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
......
package com.comleader.ldmapdownload.config; package com.comleader.ldmapdownload.config;
import com.comleader.ldmapdownload.util.CLStringUtil;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource; import org.springframework.context.annotation.PropertySource;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
/** /**
* @ClassName WebMvcConfig * @ClassName WebMvcConfig
...@@ -16,7 +15,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter ...@@ -16,7 +15,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
**/ **/
@Configuration @Configuration
@PropertySource(value = {"classpath:config/download-map.properties"}, encoding = "UTF-8") @PropertySource(value = {"classpath:config/download-map.properties"}, encoding = "UTF-8")
public class WebMvcConfig extends WebMvcConfigurerAdapter { public class WebMvcConfig extends WebMvcConfigurationSupport {
@Value("${file.mapImgPath}") @Value("${file.mapImgPath}")
private String mapImgPath; private String mapImgPath;
...@@ -25,7 +24,7 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter { ...@@ -25,7 +24,7 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter {
public void addResourceHandlers(ResourceHandlerRegistry registry) { public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/img/**") registry.addResourceHandler("/img/**")
.addResourceLocations("file:/"+ mapImgPath +"/"); .addResourceLocations("file:/"+ mapImgPath +"/");
super.addResourceHandlers(registry); System.out.println("END >> file:/"+ mapImgPath +"/");
} }
} }
...@@ -16,7 +16,6 @@ import javax.websocket.OnOpen; ...@@ -16,7 +16,6 @@ import javax.websocket.OnOpen;
import javax.websocket.Session; import javax.websocket.Session;
import javax.websocket.server.PathParam; import javax.websocket.server.PathParam;
import javax.websocket.server.ServerEndpoint; import javax.websocket.server.ServerEndpoint;
import java.io.IOException;
import java.util.Map; import java.util.Map;
import java.util.Timer; import java.util.Timer;
import java.util.TimerTask; import java.util.TimerTask;
......
# 下载地图的保存路径 # 下载地图的保存路径
#file.basepath=/Users/echo/Desktop/em-map
file.basepath=H:/em-map file.basepath=H:/em-map
# 项目的发布地址 # 项目的发布地址
#file.mapImgPath=Users/echo/Desktop/em-map
file.mapImgPath=H:/em-map file.mapImgPath=H:/em-map
# 下载地图的地址 # 下载地图的地址
......
package com.comleader.ldmapdownload; //package com.comleader.ldmapdownload;
//
import org.junit.jupiter.api.Test; //import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest; //import org.springframework.boot.test.context.SpringBootTest;
//
@SpringBootTest //@SpringBootTest
class LdmapDownloadApplicationTests { //class LdmapDownloadApplicationTests {
//
@Test // @Test
void contextLoads() { // void contextLoads() {
} // }
//
} //}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论