parent
36e28eb227
commit
2fddf4cfc1
14
pom.xml
14
pom.xml
|
|
@ -8,17 +8,15 @@
|
|||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.5.10.RELEASE</version>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<swagger.version>2.7.0</swagger.version>
|
||||
<google.guava>23.0</google.guava>
|
||||
<commons-lang3>3.7</commons-lang3>
|
||||
<fastjson.version>1.2.41</fastjson.version>
|
||||
<quartz.version>2.3.0</quartz.version>
|
||||
<druid.version>1.1.6</druid.version>
|
||||
<druid.version>1.1.8</druid.version>
|
||||
<poi.version>3.17</poi.version>
|
||||
<jwt.version>0.9.0</jwt.version>
|
||||
</properties>
|
||||
|
|
@ -45,7 +43,6 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>${commons-lang3}</version>
|
||||
</dependency>
|
||||
<!-- <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId>
|
||||
</dependency> -->
|
||||
|
|
@ -89,6 +86,12 @@
|
|||
<artifactId>druid</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
<!-- druid需要此日志包 -->
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
|
|
@ -115,7 +118,6 @@
|
|||
<dependency>
|
||||
<groupId>org.quartz-scheduler</groupId>
|
||||
<artifactId>quartz</artifactId>
|
||||
<version>${quartz.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ public class DruidConfig {
|
|||
private static final Logger log = LoggerFactory.getLogger("adminLogger");
|
||||
|
||||
@Bean
|
||||
public ServletRegistrationBean druidServlet() {
|
||||
public ServletRegistrationBean<StatViewServlet> druidServlet() {
|
||||
log.info("init Druid Servlet Configuration ");
|
||||
ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(),
|
||||
"/druid/*");
|
||||
ServletRegistrationBean<StatViewServlet> servletRegistrationBean = new ServletRegistrationBean<>(
|
||||
new StatViewServlet(), "/druid/*");
|
||||
// IP白名单
|
||||
servletRegistrationBean.addInitParameter("allow", "127.0.0.1");
|
||||
// IP黑名单(共同存在时,deny优先于allow)
|
||||
|
|
@ -46,8 +46,9 @@ public class DruidConfig {
|
|||
}
|
||||
|
||||
@Bean
|
||||
public FilterRegistrationBean filterRegistrationBean() {
|
||||
FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new WebStatFilter());
|
||||
public FilterRegistrationBean<WebStatFilter> filterRegistrationBean() {
|
||||
FilterRegistrationBean<WebStatFilter> filterRegistrationBean = new FilterRegistrationBean<>(
|
||||
new WebStatFilter());
|
||||
filterRegistrationBean.addUrlPatterns("/*");
|
||||
filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");
|
||||
return filterRegistrationBean;
|
||||
|
|
|
|||
|
|
@ -11,12 +11,11 @@ import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
|||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
|
||||
import com.boot.security.server.page.table.PageTableArgumentResolver;
|
||||
|
||||
@Configuration
|
||||
public class WebMvcConfig extends WebMvcConfigurerAdapter {
|
||||
public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
/**
|
||||
* 跨域支持
|
||||
|
|
@ -25,7 +24,7 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter {
|
|||
*/
|
||||
@Bean
|
||||
public WebMvcConfigurer corsConfigurer() {
|
||||
return new WebMvcConfigurerAdapter() {
|
||||
return new WebMvcConfigurer() {
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**").allowedMethods("*");
|
||||
|
|
|
|||
Loading…
Reference in New Issue