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