修改@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 {
|
||||
|
||||
|
@ -20,7 +20,7 @@ import java.util.Map;
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2020/4/30
|
||||
**/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class DruidConfig
|
||||
{
|
||||
@Bean
|
||||
|
@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2020/4/30
|
||||
**/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class DruidProperties
|
||||
{
|
||||
@Value("${spring.datasource.druid.initialSize}")
|
||||
|
@ -17,7 +17,7 @@ import java.util.Map;
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2020/4/30
|
||||
**/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class FilterConfig
|
||||
{
|
||||
@Value("${xss.enabled}")
|
||||
|
@ -27,7 +27,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2020/4/30
|
||||
**/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class InterceptorConfig implements WebMvcConfigurer {
|
||||
|
||||
@Value("${file.path}")
|
||||
|
@ -17,7 +17,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* MybatisPlus配置
|
||||
*
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class MybatisPlusConfig {
|
||||
|
||||
/**
|
||||
|
@ -27,7 +27,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @Date 2020/6/26
|
||||
**/
|
||||
@Slf4j
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class SmsUtils {
|
||||
|
||||
private static RedisUtils redisUtils;
|
||||
|
@ -41,7 +41,7 @@ import java.util.Map;
|
||||
* @date 2018-11-24
|
||||
*/
|
||||
@Slf4j
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableCaching
|
||||
@ConditionalOnClass(RedisOperations.class)
|
||||
@EnableConfigurationProperties(RedisProperties.class)
|
||||
|
@ -45,7 +45,7 @@ import static springfox.documentation.schema.AlternateTypeRules.newRule;
|
||||
* @Date 2019/1/9
|
||||
**/
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableSwagger2
|
||||
public class SwaggerConfig {
|
||||
|
||||
@ -104,7 +104,7 @@ public class SwaggerConfig {
|
||||
/**
|
||||
* 将Pageable转换展示在swagger中
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableSwagger2
|
||||
@EnableKnife4j
|
||||
@Import(BeanValidatorPluginsConfiguration.class)
|
||||
|
@ -18,7 +18,7 @@ import org.springframework.core.io.Resource;
|
||||
* @modified By:
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class DozerMapperConfig {
|
||||
@Bean
|
||||
public DozerBeanMapperFactoryBean dozerBeanMapperFactoryBean(@Value("classpath*:dozer/*.xml" ) Resource[] resources) throws Exception {
|
||||
|
@ -20,7 +20,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @since 2020-02-27
|
||||
*/
|
||||
@Data
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConfigurationProperties(prefix = "spring.redis")
|
||||
public class RedisConfigProperties {
|
||||
|
||||
|
@ -27,7 +27,7 @@ import org.springframework.data.redis.listener.RedisMessageListenerContainer;
|
||||
* @since 2020-02-27
|
||||
*/
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@AllArgsConstructor
|
||||
public class RedisListenerConfig {
|
||||
|
||||
|
@ -19,7 +19,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class MybatisConfig {
|
||||
/**
|
||||
* 配置mybatis的分页插件pageHelper
|
||||
|
@ -16,7 +16,7 @@ import java.io.File;
|
||||
* @date 2018-12-28
|
||||
* @author https://blog.csdn.net/llibin1024530411/article/details/79474953
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class MultipartConfig {
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@ import co.yixiang.utils.RedisUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class ExpressAutoConfiguration {
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@ import java.util.Map;
|
||||
/**
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class WxMaConfiguration {
|
||||
private static Map<String, WxMaService> maServices = Maps.newHashMap();
|
||||
private static Map<String, WxMaMessageRouter> routers = Maps.newHashMap();
|
||||
|
@ -38,7 +38,7 @@ import static me.chanjar.weixin.common.api.WxConsts.XmlMsgType;
|
||||
* @author hupeng
|
||||
* @date 2020/01/20
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class WxMpConfiguration {
|
||||
|
||||
private static Map<String, WxMpService> mpServices = Maps.newHashMap();
|
||||
|
@ -25,7 +25,7 @@ import java.util.Map;
|
||||
* @date 2020/03/01
|
||||
*/
|
||||
@Slf4j
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class WxPayConfiguration {
|
||||
|
||||
private static Map<String, WxPayService> payServices = Maps.newHashMap();
|
||||
|
Reference in New Issue
Block a user