更新依赖
修复跨域问题
This commit is contained in:
parent
9d391ea369
commit
fe7f7997a8
10
pom.xml
10
pom.xml
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.2.4.RELEASE</version>
|
<version>2.7.1</version>
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>com.yutou</groupId>
|
<groupId>com.yutou</groupId>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
<version>2.7.0</version>
|
<version>2.7.1</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@ -56,11 +56,11 @@
|
|||||||
<artifactId>jedis</artifactId>
|
<artifactId>jedis</artifactId>
|
||||||
<version>4.2.3</version>
|
<version>4.2.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>org.springframework.data</groupId>
|
<groupId>org.springframework.data</groupId>
|
||||||
<artifactId>spring-data-redis</artifactId>
|
<artifactId>spring-data-redis</artifactId>
|
||||||
<version>2.7.0</version>
|
<version>2.7.1</version>
|
||||||
</dependency>
|
</dependency>-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
@ -303,7 +303,7 @@ public class NasManager {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@RequestMapping("/nas/door/{*.ts}")
|
@RequestMapping("/nas/door/*.ts")
|
||||||
public void getDoorCCTVOfTs(HttpServletResponse response, HttpServletRequest request, @PathVariable("*.ts") String name){
|
public void getDoorCCTVOfTs(HttpServletResponse response, HttpServletRequest request, @PathVariable("*.ts") String name){
|
||||||
try {
|
try {
|
||||||
if(!name.endsWith(".ts")){
|
if(!name.endsWith(".ts")){
|
||||||
|
@ -11,7 +11,7 @@ public class CorsConfig implements WebMvcConfigurer {
|
|||||||
//设置允许跨域的路径
|
//设置允许跨域的路径
|
||||||
registry.addMapping("/**")
|
registry.addMapping("/**")
|
||||||
//设置允许跨域请求的域名
|
//设置允许跨域请求的域名
|
||||||
.allowedOrigins("*")
|
.allowedOrigins("Access-Control-Allow-Origin")
|
||||||
//是否允许证书 不再默认开启
|
//是否允许证书 不再默认开启
|
||||||
.allowCredentials(true)
|
.allowCredentials(true)
|
||||||
//设置允许的方法
|
//设置允许的方法
|
||||||
|
Loading…
Reference in New Issue
Block a user