如何将 IntelliJ IDEA 2017.1.2 连接到 Postgresql
How to connect IntelliJ IDEA 2017.1.2 to Postgresql
我是 IntelliJ IDEA IDE 世界的新手,想将它连接到 Postgresql 作为我的数据源。当我 Test Connection
使用我的 Postgresql 数据库时,IntelliJ 以 successful
消息响应。 但是,我不确定这就是配置它的全部内容。当我试图用 table 和一些数据填充我的数据库时。但是 table 甚至没有出现在数据库工具 window 中。
任何帮助表示赞赏。谢谢
你做得对。成功连接到数据库后,您可以按 Apply
,然后按 Ok
。之后你会在你的 intelliJ IDE 中看到类似下图的内容。
我刚回到示例应用程序,当我尝试 运行 时,出现以下错误;
Cannot determine embedded database driver class for database type NONE
。经过几次搜索后,我发现解决方案是将此行放在我的 application.properties
文件 spring.datasource.url=jdbc:postgresql://localhost/<database name>
中。并且连接成功。我不需要包含
spring.datasource.data-username=<username>
spring.datasource.data-password=<password>
但你可能不得不这样做。
如果您转到数据库设置,请确保选中 Introspect using JDBC metadata
。
我是 IntelliJ IDEA IDE 世界的新手,想将它连接到 Postgresql 作为我的数据源。当我 Test Connection
使用我的 Postgresql 数据库时,IntelliJ 以 successful
消息响应。
你做得对。成功连接到数据库后,您可以按 Apply
,然后按 Ok
。之后你会在你的 intelliJ IDE 中看到类似下图的内容。
我刚回到示例应用程序,当我尝试 运行 时,出现以下错误;
Cannot determine embedded database driver class for database type NONE
。经过几次搜索后,我发现解决方案是将此行放在我的 application.properties
文件 spring.datasource.url=jdbc:postgresql://localhost/<database name>
中。并且连接成功。我不需要包含
spring.datasource.data-username=<username>
spring.datasource.data-password=<password>
但你可能不得不这样做。
如果您转到数据库设置,请确保选中 Introspect using JDBC metadata
。