spring-data-jpa-course icon indicating copy to clipboard operation
spring-data-jpa-course copied to clipboard

application.properties

Open lzyamos opened this issue 2 years ago • 6 comments

Hi. I've been following your course for my school project but when I use your .properties code it's greyed out in intellij so it doesn't work for me any advice?

lzyamos avatar Feb 19 '23 08:02 lzyamos

Hi, Izyamos. Maybe you're using not the Ultimate version of Intellij, but anyway if you're using the Community edition of Intellij and your .properties file code is greyed it will work properly.

novychok avatar Apr 27 '23 18:04 novychok

hi. hello. why i cannot connect to database? the error code is: Cannot connect to "postgres@localhost". FATAL: database "amigoscode" does not exist

alyafaiz avatar Oct 05 '23 05:10 alyafaiz

Tip: read the error carefully, the error says that you don't have a database with the name amigoscode. So to resolve your error, you need to create a database with the name amigoscode. Connect to your PostgreSQL CLI "command line interface for PostgreSQL" and run the SQL scriot CREATE DATABASE amigoscode; It will create for you the database :)

novychok avatar Oct 10 '23 18:10 novychok

tq for your kind response. ok done create database amigoscode. however, my intelliJ still failed to clone and start the application. so frustrating.

Description:

Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource:

Property: driver-class-name
Value: org.postgresql.Driver
Origin: "driverClassName" from property source "source"
Reason: Failed to load driver class org.postgresql.Driver in either of HikariConfig class loader or Thread context classloader

amigoscode

please assist me, tq so much

alyafaiz avatar Oct 12 '23 03:10 alyafaiz

or is it because i clone the resource using https? not ssh?

alyafaiz avatar Oct 12 '23 04:10 alyafaiz

See this first time :) The error says that your Postgres driver is not loaded correct. Theres need a few moments to check. Make sure that you have correct driver in your maven dependencies, for example this link is for PSQL JDBC drivers -> https://mvnrepository.com/artifact/org.postgresql/postgresql

You can try also clean/install your project, or reload it from disk (google it if you doesn't know how to do that)

And again double check your dependencies in maven, there can be some mismatches in versions, or you just skip one of them.

novychok avatar Oct 12 '23 07:10 novychok