
.png)
This processing method is very popular and can enable concurrent web applications to respond to requests quickly. The implementation of this data source uses the concept of “pool” to organize JDBC connection objects, avoiding the necessary initialization and authentication time when creating new connection instances. Getconnection (URL, driverproperties) method. This will pass the encoding property with the value of utf8 to the database driver through the drivermanager. Just prefix the attribute name with “driver.” for example: Optionally, you can also pass properties to the database driver. Connection #setnetworktimeout() for more information. Defaultnetworktimeout – the default network timeout in milliseconds to wait for the database operation to complete.Defaulttransactionisolationlevel – the default connection transaction isolation level.Password – password to log in to the database.Username – the user name to log in to the database.URL – this is the JDBC URL address of the database.

Driver – this is the fully qualified name of a JDBC driven Java class (not a data source class that may be included in a JDBC Driver).Unpooled data sources only need to configure the following five attributes: This configuration is very suitable for this situation. For some databases, using connection pool is not important.

Performance depends on the database used. Although a little slow, it is a good choice for simple applications that do not require high database connection availability. The implementation of this data source opens and closes the connection each time it is requested. There are three built-in data source types (that is, type = “): UNPOOLED

The datasource element uses the standard JDBC data source interface to configure the resources of the JDBC connection object. The following configuration instructions are intercepted from the official document – XML configuration – environments In the mybatis-config.xml configuration file, you can configure the data source by setting the datasource tag. Through dynamic agent, the reuse of original connection objects and the isolation between database connections under multithreading are realized. In mybatis, the pooleddatasource data source is used as the connection pool object, and the pooledconnection object is stored in the connection pool.
