Grails 5.2应用WAR包无法部署到JBoss EAP 7.4问题咨询
Grails 5.2 应用部署 JBoss EAP 7.4 启动异常问题
基础环境
- 框架版本:Grails 5.2
- 部署目标:JBoss EAP 7.4
复现流程
- 执行
create-app helloworld命令创建HelloWorld示例项目 - 执行
create-controller hello命令创建Hello控制器,在控制器代码中添加render "Hello"逻辑 - 为适配JBoss日志兼容性,在项目
WEB-INF目录下新增jboss-deployment-structure.xml配置文件 - 执行
run-app命令本地启动应用,确认应用本地运行正常 - 执行
war命令构建WAR格式部署包 - 将构建完成的WAR包部署到JBoss EAP 7.4服务器,应用启动失败
异常信息
部署时抛出核心错误如下:
ERROR [org.springframework.boot.SpringApplication] (ServerService Thread Pool -- 85) Application run failed: io.micronaut.context.exceptions.NoSuchBeanException: No bean of type [io.micronaut.context.event.ApplicationEventPublisher<io.micronaut.context.event.StartupEvent>] exists. Make sure the bean is not disabled by bean requirements (enable trace logging for 'io.micronaut.context.condition' to check) and if the bean is enabled then ensure the class is declared a bean and annotation processing is enabled (for Java and Kotlin the 'micronaut-inject-java' dependency should be configured as an annotation processor). at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2778)
排障阶段已将io.micronaut.context.condition包的日志级别设置为TRACE,但未输出任何相关TRACE级别日志。
现有配置说明
当前使用的jboss-deployment-structure.xml为JBoss EAP通用日志适配配置,内容如下,该配置仅用于排除服务器自带的SLF4J依赖避免日志冲突,经判断与本次报错无直接关联,提供配置内容方便其他人员复现WAR包构建流程:
<jboss-deployment-structure> <deployment> <!-- Exclusions allow you to prevent the server from automatically adding some dependencies --> <exclusions> <module name="org.slf4j" /> <module name="org.slf4j.impl" /> </exclusions> </deployment> </jboss-deployment-structure>
求助问题
需要调整哪些配置,才能让Grails 5版本应用成功部署到JBoss EAP 7.4服务器上?
内容的提问来源于stack exchange,提问作者DAC
相关产品推荐
相关产品推荐

