Tencent Cloud SpringBoot Deployment + HTTPS Configuration

springboot can be packaged as jar and war, jar not much to say, a recent project needs to be packaged as war release, roughly speaking it.

Let's start by looking at the general structure of the project.

The first step is to exclude the tomcat plugin that comes with springboot

Then, don't forget to change the default jar to war for the project you want to package

In step 3, since we are using an external tomcat, we need to add the servlet dependency.

In step 4, create a new startup class under the same level package as application.

The final step, then, is to pack.

After the package is successfully packed, visit our domain at


As shown above, it means that the project has been successfully published

Next, configure https.

First go to buy some free certificates for a year, Tencent Cloud has them, of course, use Ali Cloud or other providers can also be used, apply for a certificate to download successfully and get the following:

Open the tomcat folder at.

And upload the file to tomcat's conf path, as shown here.

Add port 443, which is the port for ssl.

<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
    maxThreads="150" scheme="https" secure="true"
    clientAuth="false" sslProtocol="TLS" />

It is recommended to put it under port 80, it is important to note that keystorePass is your certificate password, here you need to change it yourself:.

Finally don't forget that port 443 on your cloud server needs to be open at

The final access address can be seen to have been successful and HTTPS access is now available at

1、Learn to implement microservices architecture based on SpringBoot and SpringCloud
2、Using captcha module to generate graphical CAPTCHA
3、Google opens new image target detection competition with unprecedented scene diversity and complexity
4、ASPNETMVC5EF6EasyUI Backend Management System 50Easyui Flat Skin
5、Huawei Spring Recruiting Internship Record

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送