</bean id="mySqlDataSource" > class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://127.0.0.1:3306/mysqljava"/>
<property name="username" value="mysqljava"/>
<property name="password" value="the_bbt"/>
</bean>
<bean id="mySqlSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="mySqlDataSource"/>
<property name="mappingResources">
<list>
<value> hibernate/SimpleEntity.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<value>
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=true
hibernate.hbm2ddl.auto=create
hibernate.current_session_context_class=thread
</value>
</property>
</bean>
above my Spring config, why my app throws:
[java] 02.12.2010 18:29:13 org.hibernate.cfg.SettingsFactory buildSettings
[java] WARNING: Could not obtain connection to query metadata
[java] java.sql.SQLException: Access denied for user root @ localhost (using password: YES)
[java] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)
<和Windows上的任何问题!