记得上下班打卡 | git大法好,push需谨慎

Commit 247c2c8a authored by 张国柄's avatar 张国柄

~web.config.authority;

parent 071343e0
......@@ -17,18 +17,18 @@ public class WebMvcConfig extends WebMvcConfigurationSupport {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**").addResourceLocations(
"classpath:/static/");
// registry.addResourceHandler("/**").addResourceLocations(
// "classpath:/static/");
registry.addResourceHandler("doc.html").addResourceLocations(
"classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/");
registry.addResourceHandler("*.js").addResourceLocations(
"/webapp/js/**");
registry.addResourceHandler("*.css").addResourceLocations(
"webapp/css/**");
registry.addResourceHandler("*.img").addResourceLocations(
"webapp/img/**");
// registry.addResourceHandler("*.js").addResourceLocations(
// "/webapp/js/**");
// registry.addResourceHandler("*.css").addResourceLocations(
// "webapp/css/**");
// registry.addResourceHandler("*.img").addResourceLocations(
// "webapp/img/**");
super.addResourceHandlers(registry);
}
......
......@@ -63,7 +63,7 @@ public class GlobalAuthorityInterceptor extends HandlerInterceptorAdapter {
@Autowired
JwtValidator jwtValidator;
@Autowired(required = false)
@Autowired
FeignAuthorityClient feignAuthorityClient;
@Override
......
......@@ -126,7 +126,7 @@ global-auth:
- ${liquidnet.info.context}/user/logs/in2111
- ${liquidnet.info.context}/user/logs/de2111
oncheck-url-pattern:
# - ${liquidnet.info.context}/**
- ${liquidnet.info.context}/**
# -----------------------------------------------------------
......
......@@ -8,12 +8,10 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
@Configuration
public class CandyWebMvcConfig extends WebMvcConfig {
@Autowired
GlobalAuthorityInterceptor globalAuthorityInterceptor;
@Override
protected void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(globalAuthorityInterceptor).addPathPatterns("/**");
registry.addInterceptor(this.globalAuthorityInterceptor).addPathPatterns("/**");
super.addInterceptors(registry);
}
}
......@@ -12,7 +12,7 @@ import java.net.InetAddress;
import java.util.Arrays;
@Slf4j
@EnableFeignClients
@EnableFeignClients(basePackages = {"com.liquidnet"})
@SpringBootApplication(scanBasePackages = {"com.liquidnet"})
public class ServiceChimeApplication implements CommandLineRunner {
@Autowired
......
......@@ -8,12 +8,10 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
@Configuration
public class ChimeWebMvcConfig extends WebMvcConfig {
@Autowired
GlobalAuthorityInterceptor globalAuthorityInterceptor;
@Override
protected void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(globalAuthorityInterceptor).addPathPatterns("/**");
registry.addInterceptor(this.globalAuthorityInterceptor).addPathPatterns("/**");
super.addInterceptors(registry);
}
}
......@@ -5,12 +5,14 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.core.env.Environment;
import java.net.InetAddress;
import java.util.Arrays;
@Slf4j
@EnableFeignClients(basePackages = {"com.liquidnet"})
@SpringBootApplication(scanBasePackages = {"com.liquidnet"})
public class ServiceDragonApplication implements CommandLineRunner {
@Autowired
......
package com.liquidnet.service.kylin.config;
import com.liquidnet.common.web.config.WebMvcConfig;
import com.liquidnet.common.web.filter.GlobalAuthorityInterceptor;
import com.liquidnet.service.kylin.interceptor.KylinAuthorityInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
......@@ -9,11 +9,11 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
@Configuration
public class KylinWebMvcConfig extends WebMvcConfig {
@Autowired
GlobalAuthorityInterceptor globalAuthorityInterceptor;
KylinAuthorityInterceptor kylinAuthorityInterceptor;
@Override
protected void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(globalAuthorityInterceptor).addPathPatterns("/**");
registry.addInterceptor(kylinAuthorityInterceptor).addPathPatterns("/**");
super.addInterceptors(registry);
}
}
......@@ -8,12 +8,10 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
@Configuration
public class OrderWebMvcConfig extends WebMvcConfig {
@Autowired
GlobalAuthorityInterceptor globalAuthorityInterceptor;
@Override
protected void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(globalAuthorityInterceptor).addPathPatterns("/**");
registry.addInterceptor(this.globalAuthorityInterceptor).addPathPatterns("/**");
super.addInterceptors(registry);
}
}
......@@ -8,12 +8,10 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
@Configuration
public class PlatformWebMvcConfig extends WebMvcConfig {
// @Autowired
// GlobalAuthorityInterceptor globalAuthorityInterceptor;
//
// @Override
// protected void addInterceptors(InterceptorRegistry registry) {
// registry.addInterceptor(globalAuthorityInterceptor).addPathPatterns("/**");
// registry.addInterceptor(this.globalAuthorityInterceptor).addPathPatterns("/**");
// super.addInterceptors(registry);
// }
}
......@@ -12,7 +12,7 @@ import java.net.InetAddress;
import java.util.Arrays;
@Slf4j
@EnableFeignClients
@EnableFeignClients(basePackages = {"com.liquidnet"})
@SpringBootApplication(scanBasePackages = {"com.liquidnet"})
public class ServiceStoneApplication implements CommandLineRunner {
@Autowired
......
......@@ -11,7 +11,7 @@ public class StoneWebMvcConfig extends WebMvcConfig {
@Override
protected void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(globalAuthorityInterceptor).addPathPatterns("/**");
registry.addInterceptor(this.globalAuthorityInterceptor).addPathPatterns("/**");
super.addInterceptors(registry);
}
}
......@@ -8,12 +8,10 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
@Configuration
public class SweetWebMvcConfig extends WebMvcConfig {
@Autowired
GlobalAuthorityInterceptor globalAuthorityInterceptor;
@Override
protected void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(globalAuthorityInterceptor).addPathPatterns("/**");
registry.addInterceptor(this.globalAuthorityInterceptor).addPathPatterns("/**");
super.addInterceptors(registry);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment