我无法在Web浏览器上打开H2控制台。 我的jhipster应用程序正在8088端口上运行。在服务器日志中,我发现H2数据库在端口18088上可用。
尝试以下。 http://localhost:18088/h2-console
下面是application-dev.yml中的详细信息。
devtools:
restart:
enabled: true
additional-exclude: .h2.server.properties
livereload:
enabled: false # we use Webpack dev server + BrowserSync for livereload
jackson:
serialization:
indent-output: true
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:h2:mem:jhipstersampleapplication;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
username: jhipsterSampleApplication
password:
hikari:
poolName: Hikari
auto-commit: false
h2:
console:
enabled: true
jpa:
database-platform: io.github.jhipster.domain.util.FixedH2Dialect
database: H2
show-sql: true
properties:
hibernate.id.new_generator_mappings: true
hibernate.connection.provider_disables_autocommit: true
hibernate.cache.use_second_level_cache: true
hibernate.cache.use_query_cache: false
hibernate.generate_statistics: false
请帮助我解决这个问题。
答案 0 :(得分:3)
添加斜线解决了我的问题 http://localhost:8080/h2-console
到 http://localhost:8080/h2-console/
答案 1 :(得分:1)
有2个不同的端口:
DatabaseConfiguration.java
中打开了此端口答案 2 :(得分:0)
转到应用程序URL的根目录(在应用程序启动中看到的Access Url) 然后最后键入“ / h2-console”。
localhost:8081 / services // h2-console