Explain spring development in detail_ JDBC operation MySQL database

This article introduces spring development_ JDBC operates the MySQL database as follows:

Project structure:

Database table:

/spring_ 1100_ spring+jdbc/src/com/b510/bean/Person. java

/spring_ 1100_ spring+jdbc/src/com/b510/service/PersonService. java

/spring_ 1100_ spring+jdbc/src/com/b510/service/impl/PersonServiceBean. java

/spring_ 1100_ spring+jdbc/src/com/b510/service/impl/PersonRowMapper. java

/spring_ 1100_ spring+jdbc/src/com/b510/test/SpringJDBCTest. java

/spring_ 1100_ spring+jdbc/src/bean. xml

Operation results;

Of course, we can use the configuration file to store our data source information:

/spring_ 1100_ spring+jdbc/src/jdbc. properties

Modify accordingly:

/spring_ 1100_ spring+jdbc/src/bean. xml

The results are the same:

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>