我正在尝试使用linkedin学习视频来学习springboot的基础知识:
使用Spring-initializr设置了项目。有一个shell脚本可以使用postgres启动docker并将数据插入表中。我已经通过手动访问docker并连接到数据库来验证了这一点
c("( subsidiary)", "Apple")
运行应用程序时,出现错误
spring.jpa.hibernate.ddl-auto=none
logging.level.org.springframework.jdbc.datasource.init.ScriptUtils=debug
logging.level.org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl=error
spring.jpa.database=postgresql
spring.datasource.platform=postgres
spring.datasource.url=jdbc:postgresql://localhost:5432/dev
spring.datasouce.username=postgres
spring.datasouce.password=postgres
shell脚本如下
2020-03-24 18:55:59.213 ERROR 1785 --- [main]
com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
org.postgresql.util.PSQLException: The server requested password-based authentication, but no password was provided.
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:544) ~[postgresql-42.2.10.jar:42.2.10]
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:145) ~[postgresql-42.2.10.jar:42.2.10]
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:196) ~[postgresql-42.2.10.jar:42.2.10]
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) ~[postgresql-42.2.10.jar:42.2.10]
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:211) ~[postgresql-42.2.10.jar:42.2.10]
at org.postgresql.Driver.makeConnection(Driver.java:459) ~[postgresql-42.2.10.jar:42.2.10]
at org.postgresql.Driver.connect(Driver.java:261) ~[postgresql-42.2.10.jar:42.2.10]
我不确定如何将密码传递给ConnectionFactoryImpl.java
如果有人可以帮助我解决此问题,我将不胜感激。