add logseq-java

This commit is contained in:
Lostecho
2024-02-02 00:12:49 +08:00
parent 1cd5bb460f
commit c7947017c3
875 changed files with 57100 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
- 在每个接口上,使用`@CrossOrigin`
- 在SpringMVC的配置类上添加跨域配置
- ```java
- @Configuration
- public class SpringMvcConfigure implements WebMvcConfigurer {
- /**
- * 添加跨域相关配置
- * @param registry
- */
- @Override
- public void addCorsMappings(CorsRegistry registry) {
- registry.addMapping("/**")//所有的path路径请求都支持
- .allowedOrigins("*")
- .allowCredentials(true)//允许身份认证
- .allowedMethods("GET","POST","PUT","DELETE");//让所有的Rest架构风格的方法都支持跨域
- }
- }
```