java - jHipster 应用程序升级到 5.8.2 后无法运行
问题描述
我有一个 jhipster 应用程序(单体)并从 5.4.2 升级到 5.8.2。
我解决了所有冲突和编译问题。
我能够在“dev”配置文件处于活动状态的情况下运行应用程序。所有测试均通过,应用程序按预期工作。
但是,一旦我为“prod”构建应用程序并使用“prod”配置文件运行它,我就会得到一个我找不到原因的异常:
2019-03-01 17:11:04.437 WARN 24308 --- [ main]
ConfigServletWebServerApplicationContext :
Exception encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name
'org.springframework.scheduling.annotation.ProxyAsyncConfiguration':
Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'asyncConfiguration' defined in URL
[jar:file:/***/config/AsyncConfiguration.class]:
Unsatisfied dependency expressed through constructor parameter 0;
nested exception is
org.springframework.boot.context.properties.ConfigurationPropertiesBindException:
Error creating bean with name 'io.github.jhipster.config.JHipsterProperties':
Could not bind properties to 'JHipsterProperties' :
prefix=jhipster,
ignoreInvalidFields=false,
ignoreUnknownFields=false;
nested exception is org.springframework.boot.context.properties.bind.BindException:
Failed to bind properties under 'jhipster' to
io.github.jhipster.config.JHipsterProperties
我试图检查类似的问题,但找不到指向我的应用程序设置的链接以及如何修复它:
https://github.com/jhipster/jhipster-registry/issues/279
https://github.com/jhipster/generator-jhipster/issues/8195
我希望有人能给我一些关于如何解决这个问题的提示。
非常感谢您的帮助,问候。
解决方案
好的......我不知道我到底改变了什么。至少我在我的 git-history 中找不到任何可以解释“修复”的东西。经过几次重建和测试后,我无法重现该问题。
可能我在构建应用程序时出错了?
无论如何 - 我观察到的事情:
我将在空白项目上生成的 application-prod.yml 与我的项目进行了比较。存在一些差异,但这些是预期的 DB、SSL 和邮件内容。
我发现了 3 件事(我不敢相信这些是问题): - 日志文件名已从 5.8.2 中的 application.yml 中删除(?)。我将它添加到 application-prod.yml - metrix -> jmx 在 5.8.2 中的 application-prod.yml 中被删除 -> 我也将它从我的删除 - 我将 useLegacyDatetimeCode=false&serverTimezone=UTC 添加到数据源 url,因为这是5.8.2 中的新功能
推荐阅读
- sql-server - SQL Server 仅将数据加载到文件组中的一个文件中
- javascript - WordPress:如何在循环外将 get_the_title() 转换为 Javascript?
- jquery - 基于 jQuery 的 div 类检查和 CSS 编辑
- html - 如何在 GCP 上使用 .dev 域设置 https
- sas - SAS:如何创建像 1,2,3,4,...,N 这样的变量
- java - 包 io.ebean 不存在 Play Framework 2.7
- python - 访问嵌套实例中的方法
- javascript - Promise.all 找不到父 Promise 的 Resolve
- artifactory - 部署到 JFrog Artifactory 的工件的唯一链接
- javascript - 这个函数可以用正则表达式重写吗?