简体   繁体   中英

How to use database connected by 'Database' utility in Inteliij IDEA?

I use InteliiJ to write some app in Java and there's a built-in utility Database.
I made connection in this, checker shows that's everything is okey and I see my database in that Utility.
And now my question - How to use this connected database in my JAVA code? I have to use JDBC and DriverManager.getConnection() ?
My way of thinking is that I just have done it. Can somebody explain me how to understand this connection by 'Database' utility and say more about using in code?

IntelliJ's database tool does not have anything to do with your code's functionality or configuration. It is just used to help you in autocompletion and you can perform queries through IntelliJ's query window to test things out.

To connect to a database from your code you have to load the configuration from your properties, depending on what you are using, and use the JDBC API. It has little to do with IntelliJ.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM