baomidou / dynamic-datasource

dynamic datasource for springboot 多数据源 动态数据源 主从分离 读写分离 分布式事务
https://www.kancloud.cn/tracy5546/dynamic-datasource/2264611
Apache License 2.0
4.68k stars 1.19k forks source link

druid 集成无法访问 #85

Closed bihell closed 5 years ago

bihell commented 5 years ago

Enviroment

JDK Version(required): 1.8

SpringBoot Version(required): 2.1.0.RELEASE

Starter Version(required):2.5.6

Describe

多数据源正常,然后加入 druid 后,访问druid 页面无法显示

Expected Result:

druid 页面

Actual Result:

Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback.

Sat Aug 10 11:04:34 CST 2019 There was an unexpected error (type=Not Found, status=404). No message available

Steps to reproduce

添加druid-spring-boot-starter依赖

image

按照官方文档所说,排除 原生Druid的快速配置类。 image

就做了以上几步,然后访问http://localhost:9090/druid 报404,感觉没起来,不知道还要配置什么

项目启动日志

INFOStarting Application on Haseo.local with PID 8766 (/Users/haseochen/GitHub/dice/dice-server/target/classes started by haseochen in /Users/haseochen/GitHub/dice/dice-server) INFOThe following profiles are active: dev INFOBean 'spring.datasource.dynamic-com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties' of type [com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) INFOBean 'com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration' of type [com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration$$EnhancerBySpringCGLIB$$e2c4584a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) INFOBean 'dsProcessor' of type [com.baomidou.dynamic.datasource.processor.DsHeaderProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) INFOBean 'dynamicDatasourceAnnotationAdvisor' of type [com.baomidou.dynamic.datasource.aop.DynamicDataSourceAnnotationAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) INFOBean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$7935e779] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) INFOTomcat initialized with port(s): 9090 (http) INFOStarting service [Tomcat] INFOStarting Servlet Engine: Apache Tomcat/9.0.12 INFOThe APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/haseochen/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.] INFOInitializing Spring embedded WebApplicationContext INFORoot WebApplicationContext: initialization completed in 1122 ms INFOServlet dispatcherServlet mapped to [/] INFOMapping filter: 'characterEncodingFilter' to: [/] INFOMapping filter: 'hiddenHttpMethodFilter' to: [/] INFOMapping filter: 'formContentFilter' to: [/] INFOMapping filter: 'requestContextFilter' to: [/] INFO{dataSource-1,diceMaster} inited INFOdynamic-datasource - load a datasource named [diceMaster] success INFOdynamic-datasource initial loaded [1] datasource,primary datasource named [diceMaster] | |. __ | | | |\/|)(| | |\ |)|||_\ / |
3.1.2 INFOMapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)] INFOInitializing ExecutorService 'applicationTaskExecutor' INFOContext refreshed INFOFound 1 custom documentation plugin(s) INFOScanning for api listing references INFOGenerating unique operation named: countUsingGET_1 INFOGenerating unique operation named: indexUsingGET_1 INFOGenerating unique operation named: indexUsingGET_2 INFOTomcat started on port(s): 9090 (http) with context path '' INFOStarted Application in 2.867 seconds (JVM running for 3.496)

huayanYu commented 5 years ago

自己排查和其他组件冲突