修改@Configuration属性配置,设置为false
This commit is contained in:
@ -24,7 +24,7 @@ import java.util.Arrays;
|
||||
* @author hupeng
|
||||
* @date 2018-11-30
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableWebMvc
|
||||
public class ConfigurerAdapter implements WebMvcConfigurer {
|
||||
|
||||
@ -38,11 +38,16 @@ public class ConfigurerAdapter implements WebMvcConfigurer {
|
||||
public CorsFilter corsFilter() {
|
||||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
config.setAllowCredentials(true); // 允许cookies跨域
|
||||
config.addAllowedOriginPattern("*");// #允许向该服务器提交请求的URI,*表示全部允许,在SpringMVC中,如果设成*,会自动转成当前请求头中的Origin
|
||||
config.addAllowedHeader("*");// #允许访问的头信息,*表示全部
|
||||
config.setMaxAge(18000L);// 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了
|
||||
config.addAllowedMethod("OPTIONS");// 允许提交请求的方法类型,*表示全部允许
|
||||
// 允许cookies跨域
|
||||
config.setAllowCredentials(true);
|
||||
// #允许向该服务器提交请求的URI,*表示全部允许,在SpringMVC中,如果设成*,会自动转成当前请求头中的Origin
|
||||
config.addAllowedOriginPattern("*");
|
||||
// #允许访问的头信息,*表示全部
|
||||
config.addAllowedHeader("*");
|
||||
// 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了
|
||||
config.setMaxAge(18000L);
|
||||
// 允许提交请求的方法类型,*表示全部允许
|
||||
config.addAllowedMethod("OPTIONS");
|
||||
config.addAllowedMethod("HEAD");
|
||||
config.addAllowedMethod("GET");
|
||||
config.addAllowedMethod("PUT");
|
||||
|
@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* MybatisPlus配置
|
||||
*
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class MybatisPlusConfig {
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,7 @@ import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||
* @author: ZhangHouYing
|
||||
* @date: 2019-08-24 15:44
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class WebSocketConfig {
|
||||
|
||||
@Bean
|
||||
|
@ -20,7 +20,7 @@ import java.util.concurrent.ThreadPoolExecutor;
|
||||
* @date 2019年10月31日15:06:18
|
||||
*/
|
||||
@Slf4j
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class AsyncTaskExecutePool implements AsyncConfigurer {
|
||||
|
||||
/** 注入配置类 */
|
||||
|
@ -19,7 +19,7 @@ import org.springframework.stereotype.Component;
|
||||
* @author /
|
||||
* @date 2019-01-07
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class QuartzConfig {
|
||||
|
||||
/**
|
||||
|
@ -35,7 +35,7 @@ import java.util.Set;
|
||||
/**
|
||||
* @author hupeng
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableWebSecurity
|
||||
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
|
||||
public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
|
@ -15,7 +15,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @date 2019年11月28日
|
||||
*/
|
||||
@Data
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConfigurationProperties(prefix = "jwt")
|
||||
public class SecurityProperties {
|
||||
|
||||
|
Reference in New Issue
Block a user