0

我在代码中使用 spring boot 作为框架,使用 oracle 18c 作为数据库。我为连接编写了以下属性:

spring.datasource.url = jdbc:oracle:thin:@//127.0.0.1:32118/XE
spring.datasource.username =****
spring.datasource.password =****
#spring.datasource.driver-class-name==oracle.jdbc.driver.OracleDriver

# Show or not log for each sql query
spring.jpa.show-sql = true

# Hibernate ddl auto (create, create-drop, update)
spring.jpa.hibernate.ddl-auto = create

# Use spring.jpa.properties.* for Hibernate native properties (the prefix is
# stripped before adding them to the entity manager)

# The SQL dialect makes Hibernate generate better SQL for the chosen database
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.Oracle12cDialect

但是,在运行应用程序时,我收到以下错误:

ERROR com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException.595 - HikariPool-1 - Exception during pool initialization.
java.sql.SQLException: ORA-28009: connection as SYS should be as SYSDBA or SYSOPER

如何在我的属性文件中将角色指定为 SYSDBA?有没有其他方法可以提供角色?

4

0 回答 0