适配ssl证书

This commit is contained in:
tsukiyalo 2025-05-26 09:54:44 +08:00
parent 39f397fd70
commit bce1748768
3 changed files with 10 additions and 3 deletions

View File

@ -7,6 +7,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.filter.ForwardedHeaderFilter;
@MapperScan("com.bsz.school_send_back_end.mapper") @MapperScan("com.bsz.school_send_back_end.mapper")
@ -22,4 +23,9 @@ public class UserCenterApplication {
public ChatMemory chatMemory(){ public ChatMemory chatMemory(){
return new InMemoryChatMemory(); return new InMemoryChatMemory();
} }
@Bean
public ForwardedHeaderFilter forwardedHeaderFilter() {
return new ForwardedHeaderFilter();
}
} }

View File

@ -9,7 +9,7 @@ import org.springframework.context.annotation.Profile;
* @author xy * @author xy
* Springdoc OpenAPI 配置 * Springdoc OpenAPI 配置
* *
* http://localhost:6448/api/swagger-ui/index.html 接口文档地址 * http://localhost:6448/swagger-ui/index.html 接口文档地址
*/ */
@Configuration @Configuration
@Profile({"dev", "test"}) // 版本控制访问 @Profile({"dev", "test"}) // 版本控制访问

View File

@ -41,11 +41,12 @@ spring:
knife4j: knife4j:
enable: true enable: true
server: server:
port: 6448 port: 9999
servlet: servlet:
context-path: /api context-path: /
session: session:
timeout: 86400s timeout: 86400s
forward-headers-strategy: framework
#证书 #证书
ssl: ssl:
enabled: false enabled: false