Use tool classes to connect to the database in idea

72f4769b863b4d95afe8011daf782a64.png

 Pay attention to the registered driver in DBUtils, in the red box.

67c5118aab6e442f8166117681b8449c.png

 There should be no spaces after db1. Please be sure to enter the database name correctly.

 

Guess you like

Origin blog.csdn.net/weixin_51825585/article/details/128206674