diff --git a/druid-spring-boot-autoconfigure/pom.xml b/druid-spring-boot-autoconfigure/pom.xml
index 9f36558..6f9036e 100644
--- a/druid-spring-boot-autoconfigure/pom.xml
+++ b/druid-spring-boot-autoconfigure/pom.xml
@@ -25,19 +25,23 @@
org.springframework
spring-jdbc
+ true
+
+
+ com.alibaba
+ druid
+ true
javax.servlet
javax.servlet-api
+ true
provided
org.slf4j
slf4j-api
-
-
- com.alibaba
- druid
+ true
diff --git a/druid-spring-boot-autoconfigure/src/main/java/com/github/trang/druid/DruidServletConfiguration.java b/druid-spring-boot-autoconfigure/src/main/java/com/github/trang/druid/DruidServletConfiguration.java
index 8016a94..646fcdc 100644
--- a/druid-spring-boot-autoconfigure/src/main/java/com/github/trang/druid/DruidServletConfiguration.java
+++ b/druid-spring-boot-autoconfigure/src/main/java/com/github/trang/druid/DruidServletConfiguration.java
@@ -4,6 +4,7 @@ import com.alibaba.druid.support.http.StatViewServlet;
import com.github.trang.druid.properties.DruidServletProperties.DruidStatViewServletProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
@@ -11,6 +12,8 @@ import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.util.StringUtils;
+import javax.servlet.Servlet;
+
import static com.github.trang.druid.properties.DruidServletProperties.DRUID_STAT_VIEW_SERVLET_PREFIX;
/**
@@ -19,6 +22,7 @@ import static com.github.trang.druid.properties.DruidServletProperties.DRUID_STA
* @author trang
*/
@ConditionalOnWebApplication
+@ConditionalOnClass(Servlet.class)
@ConditionalOnProperty(prefix = DRUID_STAT_VIEW_SERVLET_PREFIX, name = "enabled", havingValue = "true")
@EnableConfigurationProperties(DruidStatViewServletProperties.class)
public class DruidServletConfiguration {
diff --git a/druid-spring-boot-autoconfigure/src/main/java/com/github/trang/druid/DruidStatConfiguration.java b/druid-spring-boot-autoconfigure/src/main/java/com/github/trang/druid/DruidStatConfiguration.java
index d13552f..805abfe 100644
--- a/druid-spring-boot-autoconfigure/src/main/java/com/github/trang/druid/DruidStatConfiguration.java
+++ b/druid-spring-boot-autoconfigure/src/main/java/com/github/trang/druid/DruidStatConfiguration.java
@@ -19,6 +19,8 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.StringUtils;
+import javax.servlet.Filter;
+
import static com.github.trang.druid.properties.DruidStatProperties.DRUID_AOP_STAT_PREFIX;
import static com.github.trang.druid.properties.DruidStatProperties.DRUID_WEB_STAT_PREFIX;
@@ -69,6 +71,7 @@ public class DruidStatConfiguration {
*/
@Configuration
@ConditionalOnWebApplication
+ @ConditionalOnClass(Filter.class)
@ConditionalOnProperty(prefix = DRUID_WEB_STAT_PREFIX, name = "enabled", havingValue = "true")
public static class DruidWebStatConfiguration {
diff --git a/druid-spring-boot-samples/pom.xml b/druid-spring-boot-samples/pom.xml
index 11109c2..2dbb739 100644
--- a/druid-spring-boot-samples/pom.xml
+++ b/druid-spring-boot-samples/pom.xml
@@ -30,22 +30,11 @@
org.mybatis.spring.boot
mybatis-spring-boot-starter
- RELEASE
-
-
- org.apache.tomcat
- tomcat-jdbc
-
-
com.github.drtrang
druid-spring-boot-starter
-
- com.github.drtrang
- druid-spring-boot-actuator
-
com.h2database
h2
diff --git a/druid-spring-boot-starter/pom.xml b/druid-spring-boot-starter/pom.xml
index 08f7549..67cf1999 100644
--- a/druid-spring-boot-starter/pom.xml
+++ b/druid-spring-boot-starter/pom.xml
@@ -17,6 +17,18 @@
com.github.drtrang
druid-spring-boot-autoconfigure
+
+ org.springframework
+ spring-jdbc
+
+
+ com.alibaba
+ druid
+
+
+ org.slf4j
+ slf4j-api
+
\ No newline at end of file
diff --git a/druid-spring-boot-starter/src/main/resources/META-INF/spring.provides b/druid-spring-boot-starter/src/main/resources/META-INF/spring.provides
index 6e9da6a..83f63bb 100644
--- a/druid-spring-boot-starter/src/main/resources/META-INF/spring.provides
+++ b/druid-spring-boot-starter/src/main/resources/META-INF/spring.provides
@@ -1 +1 @@
-provides: spring-boot-autoconfigure,spring-jdbc,druid,druid-spring-boot-autoconfigure
\ No newline at end of file
+provides: spring-boot-autoconfigure,spring-jdbc,druid,druid-spring-boot-autoconfigure,slf4j-api
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index dd27b96..1cd043e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,8 +36,8 @@
druid-spring-boot-starter
druid-spring-boot-autoconfigure
- druid-spring-boot-samples
druid-spring-boot-actuator
+ druid-spring-boot-samples
@@ -46,8 +46,9 @@
UTF-8
1.8
- 1.5.7.RELEASE
1.1.3
+ 1.3.1
+ 1.5.7.RELEASE
3.0.1
3.0.0
@@ -90,6 +91,17 @@
pom
import
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+ ${mybatis-spring-boot-starter.version}
+
+
+ org.apache.tomcat
+ tomcat-jdbc
+
+
+
com.alibaba
druid