为了账号安全,请及时绑定邮箱和手机立即绑定

ssm项目结合druid配置问题,项目启动一直提示连接被拒绝

ssm项目结合druid配置问题,项目启动一直提示连接被拒绝

努力奔跑的自己 2018-09-30 18:36:37
配置代码:springContent.xml<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">     <property name="driverClassName" value="${db.driverClassName}" />     <property name="url" value="${db.url}" />     <property name="username" value="${db.username}" />     <property name="password" value="${db.password}" />     <property name="initialSize" value="3" />     <property name="minIdle" value="3" />     <property name="maxActive" value="20" />     <property name="maxWait" value="60000" />     <property name="filters" value="stat,wall" /> </bean> <bean id="stat-filter" class="com.alibaba.druid.filter.stat.StatFilter">     <property name="slowSqlMillis" value="3000" />     <property name="logSlowSql" value="true" />     <property name="mergeSql" value="true" /> </bean> <bean id="wall-filter" class="com.alibaba.druid.wall.WallFilter">     <property name="dbType" value="mysql" /> </bean>web.xml<servlet>   <servlet-name>DruidStatServlet</servlet-name>   <servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>   <init-param>     <param-name>loginUsername</param-name>     <param-value>druid</param-value>   </init-param>   <init-param>     <param-name>loginPassword</param-name>     <param-value>druid</param-value>   </init-param> </servlet> <servlet-mapping>   <servlet-name>DruidStatServlet</servlet-name>   <url-pattern>/sys/druid/*</url-pattern> </servlet-mapping> <filter>   <filter-name>DruidWebStatFilter</filter-name>   <filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>   <init-param>     <param-name>exclusions</param-name>     <param-value>*.js,*.css,*.jpg,*.png,*.ico,*.gif,/sys/druid/*</param-value>   </init-param> </filter> <filter-mapping>   <filter-name>DruidWebStatFilter</filter-name>   <url-pattern>/*</url-pattern> </filter-mapping>数据库用户名和密码以及url都没有问题,但是项目启动一直报错,报错信息如下:
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 3077 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信