Configuration parameters of the usual data source in Spring

xiaoxiao2021-03-13  187

A total of directly connected, connecting the pool, JNDI binding three kinds

1, directly connected

com.mysql.jdbc.Driver jdbc: mysql: //127.0.0.1: 3306 / test admin < Property Name = "Password">

2, connect pool

JDBC: mysql: //127.0.0.1: 3306 / test admin

3 JNDI, take Tomcat as an example

java: comp / env / jdbc / testdb

Note that the JNDI write method of each container is different, so Java: Comp / Env / JDBC / TESTDB is full, but may be part of the JNDI, such as Tomcat Configuration JDBC / TestDB

Configuration error message javax.naming.namenotFoundException: name jdbc is not bound in this context exception

转载请注明原文地址:https://www.9cbs.com/read-129008.html

New Post(0)