配置文件属性与插件内置属性冲突

错误提示:Access denied for user 'admin'@'localhost' (using password: YES)

 

代码:

   jdbc.properties文件:

jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/power_manage
username=root
jdbc.password=root

 

    context-dispatcher.xml文件

<bean class="org.springframework.web.context.support.ServletContextPropertyPlaceholderConfigurer">
	  	<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
	  	<property name="searchContextAttributes" value="true" />
	  	<property name="contextOverride" value="true" />
	  	<property name="ignoreResourceNotFound" value="true" />
	  	<property name="locations">
  			<list>
				<value>/WEB-INF/jdbc.properties</value>
  			</list>
 		</property>
   	</bean>
   	
	<!--创建jdbc数据源 -->
	<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
		<property name="driverClassName" value="${jdbc.driver}" />
		<property name="url" value="${jdbc.url}" />
		<property name="username" value="${username}" />
		<property name="password" value="${jdbc.password}" />
	</bean>

 原因:username可能与某个插件的属性冲突,改下名问题解决。

 

你可能感兴趣的:(配置文件属性与插件内置属性冲突)