A data source is a database or database server used by a database application. The data source, as its name implies, is the source of the data, the device or the original media that provides some of the required data. All information that establishes a database connection is stored in the data source. Just as you can find a file in the file system by specifying a file name, you can find the appropriate database connection by providing the correct data source name.
Mybatis-config.xml
Default= "Development" > <environment id= "Development" > <transactionmanager type= " JDBC "/> <datasource type=" Pooled "> <property name=" Driver "value=" ${driver} "/> < Property name= "url" value= "${url}"/> <property name= "username" value= "${username}"/> <property Name= "Password" value= "${password}"/> </dataSource> </environment> </ Environments>
Jdbc.properties
driver=com.mysql.jdbc.Driverjdbc_url=jdbc:mysql://${envi.dbhost}/gmall?usessl=true& SERVERTIMEZONE=UTCjdbc_user=rootjdbc_password=xxx
MySQL Database data source