Code: Select all
String url = "jdbc:postgresql://localhost:5433/";
String username = ;
String password =
;
return DataSourceBuilder
.create()
.driverClassName("org.postgresql.Driver")
.url(url)
.username(username)
.password(password)
.build();
< /code>
Wenn ich die Hauptmethode der Spring Application ausführe, wird die folgende Ausnahme ausgelöst: < /p>
Caused by: org.postgresql.util.PSQLException:
The server requested password-based authentication, but no password was provided.
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:534)
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:141)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192)