数据库jdbc链接:mysql, oracle, postgresql

时间:2022-01-08 12:43:50

#db mysql
#jdbc.driver=com.mysql.jdbc.Driver
#jdbc.url=jdbc:mysql://localhost:3306/mysql?&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull
#jdbc.username=root
#jdbc.password=
#在xml配置文件中,url中的&符号需要转义成&。比如在tomcat的server.xml中配置数据库连接池时,mysql jdbc url样例如下
#jdbc:mysql://localhost:3306/test?user=root&password=&useUnicode=true&characterEncoding=utf-8

#db oracle
#jdbc.driver=oracle.jdbc.driver.OracleDriver
#jdbc.url="jdbc:oracle:thin:@192.168.8.1:1521:orcl
#jdbc.username=root
#jdbc.password=
#http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html

#db postgress
jdbc.driver=org.postgresql.Driver
jdbc.url=jdbc:postgresql://localhost/soft
jdbc.username=postgres
jdbc.password=postgres
#https://jdbc.postgresql.org/download.html