When developing a database-based application system, you must configure the data source in the project to connect to the database for database operations. The methods for configuring data sources for different databases are basically the same. The difference is that the JDBC driver classes and connection URLs of different databases and the corresponding database usernames and passwords are different. The following lists
When developing a database-based application system, you must configure the data source in the project to connect to the database for database operations. The methods for configuring data sources in different databases are basically the same. The difference is that the JDBC driver classes and connection URLs of different databases and the corresponding database usernames and passwords are different. The following lists
When developing a database-based application system, you must configure the data source in the project to connect to the database for database operations. The methods for configuring data sources in different databases are basically the same. The difference is that the JDBC driver classes and connection URLs of different databases and the corresponding database usernames and passwords are different. The following lists the configuration of common database data sources and corresponding JDBC driver packages.
1. Data source configuration format in Spring
The data source defined in the implementation solution of the DBCP open source database of Jakarta is used here.
2. configuration parameters for various databases and their data sources
Database Oracle
Oracle. jdbc. driver. OracleDriver
URL jdbc: oracle: thin: @ localhost: 1521: orcl
Database DB2
Driver com. ibm. db2.jdbc. app. DB2Driver
URL jdbc: db2: // localhost: 5000/testDB
Database SQL Server
Driver com. microsoft. jdbc. sqlserver. SQLServerDriver
URL jdbc. microsoft: sqlserver: // localhost: 1433; DatabaseName = testDB
Database Sybase
Driver com. sybase. jdbc. SybDriver
URL jdbc: sybase: Tds: localhost: 5007/testDB
Database Informix
Driver com. informix. jdbc. IfxDriver
URL jdbc: informixsqli: // 123.45.67.89: 1533/myDB: INFORMIXSERVER = myserver
Mysql database
Driver com. musql. jdbc. Driver
URL jdbc: mysql: // localhost: 3306/testDB
Database PostgreSQL
Driver org. postgresql. Driver
URL jdbc: postgresql: // localhost/testDB
Database HSQLDB
Driver org. hsqldb. jdbcDriver
URL jdbc: hsqldb: hsql: // llocalhost: 9902
Http://g.kehou.com/t1018427501.html