mysql经过mysql-proxy代理后通过Spring配置数据源连接不上数据库一直卡在加载的时候

只是学习学习 2017-12-14 02:43:03
在经过各种配置后,搭建起来了一个mysql-proxy的读写分离服务,但是在通过spring配置数据源连接的时候一直卡在加载的时候无法启动,卡住的地方日志如下:
2017-12-14 14:35:19,226 [RMI TCP Connection(3)-127.0.0.1] [org.apache.ibatis.io.ResolverUtil]-[DEBUG] Checking to see if class com.geekfaith.entity.User matches criteria [is assignable to Object]
2017-12-14 14:35:19,228 [RMI TCP Connection(3)-127.0.0.1] [org.apache.ibatis.io.ResolverUtil]-[DEBUG] Checking to see if class com.geekfaith.entity.UserOperation matches criteria [is assignable to Object]
2017-12-14 14:35:19,229 [RMI TCP Connection(3)-127.0.0.1] [org.apache.ibatis.io.ResolverUtil]-[DEBUG] Checking to see if class com.geekfaith.entity.UserOperationType matches criteria [is assignable to Object]
2017-12-14 14:35:19,231 [RMI TCP Connection(3)-127.0.0.1] [org.mybatis.spring.SqlSessionFactoryBean]-[DEBUG] Scanned package: 'com.geekfaith.entity' for aliases
2017-12-14 14:35:19,231 [RMI TCP Connection(3)-127.0.0.1] [org.mybatis.spring.SqlSessionFactoryBean]-[DEBUG] Registered plugin: 'com.baomidou.mybatisplus.plugins.CachePaginationInterceptor@6ce0a0d0'
Thu Dec 14 14:35:19 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
14-Dec-2017 14:35:22.244 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory D:\Java\apache-tomcat-8.0.28\webapps\manager
14-Dec-2017 14:35:22.349 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory D:\Java\apache-tomcat-8.0.28\webapps\manager has finished in 103 ms

在网上各种找也没有找到不知道什么原因,一下是我的数据源和配置文件内容
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://192.168.1.162:4040/blog?characterEncoding=utf-8
jdbc.username=root
jdbc.password=root

 <!-- 数据库连接池 -->
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
init-method="init" destroy-method="close">
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
<property name="driverClassName" value="${jdbc.driver}"/>
<property name="maxActive" value="10"/>
<property name="minIdle" value="5"/>
</bean>
...全文
1069 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
dany_zj_cn 2021-02-01
  • 打赏
  • 举报
回复
更换server 到 mysql server 5.7.31 或 mariadb server 5.5.68, driver 换来换去还有会有点问题
cbupdate 2021-01-31
  • 打赏
  • 举报
回复
引用 2 楼 dany_zj_cn 的回复:
jdbc.driver 的问题

请问用哪个驱动能解决呢?我也遇到了同样的问题,跪求解
qkniit 2021-01-06
  • 打赏
  • 举报
回复
读写分离 不是要两个数据源?
dany_zj_cn 2021-01-06
  • 打赏
  • 举报
回复
jdbc.driver 的问题
就是叫小康 2020-12-15
  • 打赏
  • 举报
回复
解决了吗,我碰到了同样的问题

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧