db.url= jdbc:oracle:thin:@127.0.0.1:1521:orcl
db.user = spring
db.password = springpwd
db.driverClass = oracle.jdbc.driver.OracleDriver
dataSource.url= jdbc:mysql://127.0.0.1:3306/forum
dataSource.username = root
dataSource.password =1234
dataSource.driverClassName =com.mysql.jdbc.Driver
项目数据库从oracle转移到mysql配置会有一点不同,由于平时的疏忽,导致在数据库转移的时候出现很多问题。记录一下,谨防下次遇到相同的问题。
A ResourcePool could not acquire a resource from its primary factory or sour.检查数据库配置url,username,password,driverClassName是否有误。后来发现原来的user应该改成username.
改过之后又报错:
Illegal connection port value ‘3306’
应该改成: jdbc:mysql://127.0.0.1:3306/forum,而不是jdbc:mysql://127.0.0.1:3306:forum
细节总是容易被忽略