客户最近要求把一个Springboot应用从was 9 迁移部署至 liberty 20,jar包部署,自启动没问题,但部署到liberty上server.xml配置如下:
<?xml version="1.0" encoding="UTF-8"?>
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>javaee-8.0</feature>
<feature>springBoot-2.0</feature>
<feature>localConnector-1.0</feature>
<feature>websocket-1.1</feature>
</featureManager>
<!-- This template enables security. To get the full use of all the capabilities, a keystore and user registry are required. -->
<!-- For the keystore, default keys are generated and stored in a keystore. To provide the keystore password, generate an
encoded password using bin/securityUtility encode and add it below in the password attribute of the keyStore element.
Then uncomment the keyStore element. -->
<!--
<keyStore password=""/>
-->
<!--For a user registry configuration, configure your user registry. For example, configure a basic user registry using the
basicRegistry element. Specify your own user name below in the name attribute of the user element. For the password,
generate an encoded password using bin/securityUtility encode and add it in the password attribute of the user element.
Then uncomment the user element. -->
<basicRegistry id="basic" realm="BasicRealm">
<!-- <user name="yourUserName" password="" /> -->
</basicRegistry>
<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
<httpEndpoint id="defaultHttpEndpoint"
httpPort="9080"
httpsPort="9443" />
<!-- Automatically expand WAR files and EAR files -->
<!-- <applicationManager autoExpand="true"/> -->
<springBootApplication location="qhrms.jar"/>
</server>
应用启动失败,报StackOverFlow错误:

将Spring Boot应用从WAS 9迁移至IBM Liberty 20时遇到StackOverflow错误。错误日志显示在加载Web模块时出现问题。通过排查发现是由于liberty自身加载的依赖循环引用导致,通过调整server.xml的<featureManager>配置解决了问题,应用成功启动。
最低0.47元/天 解锁文章
3791

被折叠的 条评论
为什么被折叠?



