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

修改了部分信息

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