Compare commits

..

No commits in common. "main" and "v1.0.2" have entirely different histories.
main ... v1.0.2

7 changed files with 3 additions and 22 deletions

1
.gitignore vendored
View File

@ -66,7 +66,6 @@ application-dev.yaml
application.properties
application.yaml
application-prod.yaml
application-tencent.yaml
# -----------------------------
# 图片 / 文件上传目录(如有)

View File

@ -1,2 +0,0 @@
<h1>电科院材料所实验室仪器设备预约系统-后端项目</h1>
本项目使用SpringBoot, Mybatis-plus, SpringSecurity, easyexcel, MySQL等技术栈实现

View File

@ -10,7 +10,7 @@
</parent>
<groupId>github.benjamin</groupId>
<artifactId>equip-reserve-backend</artifactId>
<version>1.0.3</version>
<version>1.0.2-SNAPSHOT</version>
<name>equip-reserve-backend</name>
<description>equip-reserve-backend</description>
<url/>

View File

@ -7,7 +7,6 @@ import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.CorsConfigurationSource;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import java.util.Arrays;
import java.util.List;
@Configuration
@ -19,7 +18,7 @@ public class CorsConfig {
@Bean
public CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration config = new CorsConfiguration();
config.setAllowedOriginPatterns(Arrays.asList(allowedOrigins.split(",")));
config.setAllowedOriginPatterns(List.of(allowedOrigins));
config.setAllowCredentials(true);
config.addAllowedHeader("*");
config.addAllowedMethod("*");

View File

@ -32,7 +32,6 @@ public class SecurityConfig {
.authorizeHttpRequests(auth -> auth
.requestMatchers("/login").permitAll()
.requestMatchers("/device_image/**").permitAll()
.requestMatchers("/health").permitAll()
.anyRequest().authenticated())
.addFilterBefore(jwtAuthFilter(), UsernamePasswordAuthenticationFilter.class)
.build();

View File

@ -1,14 +0,0 @@
package github.benjamin.equipreservebackend.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HealthController {
@GetMapping("/health")
public String health() {
return "ok";
}
}

View File

@ -16,7 +16,7 @@ jwt:
secret: your-secret
equip-reserve:
device-days: 7
allowed-origins: "http://localhost:5173,http://127.0.0.1:5173"
allowed-origins: http://localhost:5173
mybatis-plus:
mapper-locations: classpath:mapper/*.xml
configuration: