修改@Configuration属性配置,设置为false
This commit is contained in:
@ -24,7 +24,7 @@ import java.util.Arrays;
|
|||||||
* @author hupeng
|
* @author hupeng
|
||||||
* @date 2018-11-30
|
* @date 2018-11-30
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
@EnableWebMvc
|
@EnableWebMvc
|
||||||
public class ConfigurerAdapter implements WebMvcConfigurer {
|
public class ConfigurerAdapter implements WebMvcConfigurer {
|
||||||
|
|
||||||
@ -38,11 +38,16 @@ public class ConfigurerAdapter implements WebMvcConfigurer {
|
|||||||
public CorsFilter corsFilter() {
|
public CorsFilter corsFilter() {
|
||||||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||||
CorsConfiguration config = new CorsConfiguration();
|
CorsConfiguration config = new CorsConfiguration();
|
||||||
config.setAllowCredentials(true); // 允许cookies跨域
|
// 允许cookies跨域
|
||||||
config.addAllowedOriginPattern("*");// #允许向该服务器提交请求的URI,*表示全部允许,在SpringMVC中,如果设成*,会自动转成当前请求头中的Origin
|
config.setAllowCredentials(true);
|
||||||
config.addAllowedHeader("*");// #允许访问的头信息,*表示全部
|
// #允许向该服务器提交请求的URI,*表示全部允许,在SpringMVC中,如果设成*,会自动转成当前请求头中的Origin
|
||||||
config.setMaxAge(18000L);// 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了
|
config.addAllowedOriginPattern("*");
|
||||||
config.addAllowedMethod("OPTIONS");// 允许提交请求的方法类型,*表示全部允许
|
// #允许访问的头信息,*表示全部
|
||||||
|
config.addAllowedHeader("*");
|
||||||
|
// 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了
|
||||||
|
config.setMaxAge(18000L);
|
||||||
|
// 允许提交请求的方法类型,*表示全部允许
|
||||||
|
config.addAllowedMethod("OPTIONS");
|
||||||
config.addAllowedMethod("HEAD");
|
config.addAllowedMethod("HEAD");
|
||||||
config.addAllowedMethod("GET");
|
config.addAllowedMethod("GET");
|
||||||
config.addAllowedMethod("PUT");
|
config.addAllowedMethod("PUT");
|
||||||
|
@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
* MybatisPlus配置
|
* MybatisPlus配置
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class MybatisPlusConfig {
|
public class MybatisPlusConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13,7 +13,7 @@ import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
|||||||
* @author: ZhangHouYing
|
* @author: ZhangHouYing
|
||||||
* @date: 2019-08-24 15:44
|
* @date: 2019-08-24 15:44
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class WebSocketConfig {
|
public class WebSocketConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ -20,7 +20,7 @@ import java.util.concurrent.ThreadPoolExecutor;
|
|||||||
* @date 2019年10月31日15:06:18
|
* @date 2019年10月31日15:06:18
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class AsyncTaskExecutePool implements AsyncConfigurer {
|
public class AsyncTaskExecutePool implements AsyncConfigurer {
|
||||||
|
|
||||||
/** 注入配置类 */
|
/** 注入配置类 */
|
||||||
|
@ -19,7 +19,7 @@ import org.springframework.stereotype.Component;
|
|||||||
* @author /
|
* @author /
|
||||||
* @date 2019-01-07
|
* @date 2019-01-07
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class QuartzConfig {
|
public class QuartzConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,7 +35,7 @@ import java.util.Set;
|
|||||||
/**
|
/**
|
||||||
* @author hupeng
|
* @author hupeng
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
@EnableWebSecurity
|
@EnableWebSecurity
|
||||||
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
|
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
|
||||||
public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||||
|
@ -15,7 +15,7 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
* @date 2019年11月28日
|
* @date 2019年11月28日
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
@ConfigurationProperties(prefix = "jwt")
|
@ConfigurationProperties(prefix = "jwt")
|
||||||
public class SecurityProperties {
|
public class SecurityProperties {
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import java.util.Map;
|
|||||||
* @Author hupeng <610796224@qq.com>
|
* @Author hupeng <610796224@qq.com>
|
||||||
* @Date 2020/4/30
|
* @Date 2020/4/30
|
||||||
**/
|
**/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class DruidConfig
|
public class DruidConfig
|
||||||
{
|
{
|
||||||
@Bean
|
@Bean
|
||||||
|
@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
* @Author hupeng <610796224@qq.com>
|
* @Author hupeng <610796224@qq.com>
|
||||||
* @Date 2020/4/30
|
* @Date 2020/4/30
|
||||||
**/
|
**/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class DruidProperties
|
public class DruidProperties
|
||||||
{
|
{
|
||||||
@Value("${spring.datasource.druid.initialSize}")
|
@Value("${spring.datasource.druid.initialSize}")
|
||||||
|
@ -17,7 +17,7 @@ import java.util.Map;
|
|||||||
* @Author hupeng <610796224@qq.com>
|
* @Author hupeng <610796224@qq.com>
|
||||||
* @Date 2020/4/30
|
* @Date 2020/4/30
|
||||||
**/
|
**/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class FilterConfig
|
public class FilterConfig
|
||||||
{
|
{
|
||||||
@Value("${xss.enabled}")
|
@Value("${xss.enabled}")
|
||||||
|
@ -27,7 +27,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|||||||
* @Author hupeng <610796224@qq.com>
|
* @Author hupeng <610796224@qq.com>
|
||||||
* @Date 2020/4/30
|
* @Date 2020/4/30
|
||||||
**/
|
**/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class InterceptorConfig implements WebMvcConfigurer {
|
public class InterceptorConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
@Value("${file.path}")
|
@Value("${file.path}")
|
||||||
|
@ -17,7 +17,7 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
* MybatisPlus配置
|
* MybatisPlus配置
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class MybatisPlusConfig {
|
public class MybatisPlusConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,7 +27,7 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
* @Date 2020/6/26
|
* @Date 2020/6/26
|
||||||
**/
|
**/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class SmsUtils {
|
public class SmsUtils {
|
||||||
|
|
||||||
private static RedisUtils redisUtils;
|
private static RedisUtils redisUtils;
|
||||||
|
@ -41,7 +41,7 @@ import java.util.Map;
|
|||||||
* @date 2018-11-24
|
* @date 2018-11-24
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
@EnableCaching
|
@EnableCaching
|
||||||
@ConditionalOnClass(RedisOperations.class)
|
@ConditionalOnClass(RedisOperations.class)
|
||||||
@EnableConfigurationProperties(RedisProperties.class)
|
@EnableConfigurationProperties(RedisProperties.class)
|
||||||
|
@ -45,7 +45,7 @@ import static springfox.documentation.schema.AlternateTypeRules.newRule;
|
|||||||
* @Date 2019/1/9
|
* @Date 2019/1/9
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
@EnableSwagger2
|
@EnableSwagger2
|
||||||
public class SwaggerConfig {
|
public class SwaggerConfig {
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ public class SwaggerConfig {
|
|||||||
/**
|
/**
|
||||||
* 将Pageable转换展示在swagger中
|
* 将Pageable转换展示在swagger中
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
@EnableSwagger2
|
@EnableSwagger2
|
||||||
@EnableKnife4j
|
@EnableKnife4j
|
||||||
@Import(BeanValidatorPluginsConfiguration.class)
|
@Import(BeanValidatorPluginsConfiguration.class)
|
||||||
|
@ -18,7 +18,7 @@ import org.springframework.core.io.Resource;
|
|||||||
* @modified By:
|
* @modified By:
|
||||||
* @version: 1.0
|
* @version: 1.0
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class DozerMapperConfig {
|
public class DozerMapperConfig {
|
||||||
@Bean
|
@Bean
|
||||||
public DozerBeanMapperFactoryBean dozerBeanMapperFactoryBean(@Value("classpath*:dozer/*.xml" ) Resource[] resources) throws Exception {
|
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
|
* @since 2020-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
@ConfigurationProperties(prefix = "spring.redis")
|
@ConfigurationProperties(prefix = "spring.redis")
|
||||||
public class RedisConfigProperties {
|
public class RedisConfigProperties {
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ import org.springframework.data.redis.listener.RedisMessageListenerContainer;
|
|||||||
* @since 2020-02-27
|
* @since 2020-02-27
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class RedisListenerConfig {
|
public class RedisListenerConfig {
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class MybatisConfig {
|
public class MybatisConfig {
|
||||||
/**
|
/**
|
||||||
* 配置mybatis的分页插件pageHelper
|
* 配置mybatis的分页插件pageHelper
|
||||||
|
@ -16,7 +16,7 @@ import java.io.File;
|
|||||||
* @date 2018-12-28
|
* @date 2018-12-28
|
||||||
* @author https://blog.csdn.net/llibin1024530411/article/details/79474953
|
* @author https://blog.csdn.net/llibin1024530411/article/details/79474953
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class MultipartConfig {
|
public class MultipartConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,7 +16,7 @@ import co.yixiang.utils.RedisUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class ExpressAutoConfiguration {
|
public class ExpressAutoConfiguration {
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class WxMaConfiguration {
|
public class WxMaConfiguration {
|
||||||
private static Map<String, WxMaService> maServices = Maps.newHashMap();
|
private static Map<String, WxMaService> maServices = Maps.newHashMap();
|
||||||
private static Map<String, WxMaMessageRouter> routers = 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
|
* @author hupeng
|
||||||
* @date 2020/01/20
|
* @date 2020/01/20
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class WxMpConfiguration {
|
public class WxMpConfiguration {
|
||||||
|
|
||||||
private static Map<String, WxMpService> mpServices = Maps.newHashMap();
|
private static Map<String, WxMpService> mpServices = Maps.newHashMap();
|
||||||
|
@ -25,7 +25,7 @@ import java.util.Map;
|
|||||||
* @date 2020/03/01
|
* @date 2020/03/01
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class WxPayConfiguration {
|
public class WxPayConfiguration {
|
||||||
|
|
||||||
private static Map<String, WxPayService> payServices = Maps.newHashMap();
|
private static Map<String, WxPayService> payServices = Maps.newHashMap();
|
||||||
|
Reference in New Issue
Block a user