Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Boot 适配部署 TongWeb7 #15

Open
zhangwt-cn opened this issue Sep 12, 2023 · 0 comments
Open

Spring Boot 适配部署 TongWeb7 #15

zhangwt-cn opened this issue Sep 12, 2023 · 0 comments
Labels
信创迁移 国产化信创迁移适配

Comments

@zhangwt-cn
Copy link
Owner

zhangwt-cn commented Sep 12, 2023

项目适配

修改pom文件,jar -> war

<packaging>war</packaging>

继承配置SpringBootServletInitializer

两种方式选其一

  1. 启动类直接继承
public class DemoApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }

    // 增加configure实现
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(DemoApplication.class);
    }
}
  1. 自定义一个类
public class Demo extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(DemoApplication.class);
    }
}

Spring Boot适配TongWeb7只需要更改打包方式,打包成war部署,与Tomcat的war包并无差别

TongWeb 部署war

创建虚拟主机

在创建虚拟主机,只需设置好主机名称即可(每个服务或应用对应一个虚拟主机)
image

创建http通道

  1. 设置http通道名称
  2. 设置监听端口(应用端口)
  3. 设置虚拟主机,选择刚刚创建的虚拟主机
image

这三个地方设置后就一直点下一步完成创建即可

服务部署

  1. 上传本地已经编译好的 war
  2. 完成上传之后点击开始部署
  3. 设置应用名称和应用前缀
  4. 设置虚拟主机选择刚刚创建的虚拟主机
  5. 设置完成之后一直点下一步直到完成
image

服务http路径 http://ip:port/应用前缀port 是创建http通道时设置的监听端口

war服务日志在TongWeb目录下的 logs/server.log

@zhangwt-cn zhangwt-cn added the 信创迁移 国产化信创迁移适配 label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
信创迁移 国产化信创迁移适配
Projects
None yet
Development

No branches or pull requests

1 participant