Problem occurrence and resolution:
The main c3p0-config.xml
reason is that this time I used the C3P0 connection pool, and the project built by maven did not read my configuration file.The configuration file of the project C3P0 connection pool built by maven cannot be placed directly in the src directory.
Solution:
- Create a resources file under src->main
- Mark the created resources file as a resource directory
- The
c3p0-config.xml
profile lost in
- Configure the database driver dependencies
- I use the 8.0.17 version of the database connection driver.After maven downloads the connection driver, copy 8.0.17 to the additional dependency directory of the jre of the machine running the project.
That's it. Deploying to linux will report the exception of not being able to find the jar package, follow the same method, and then throw this into the jre->lib->ext of linux.
Delete and try to see that my jar package needs to be used