How to Obtain and Configure a Free SSL Certificate for a Spring Boot Application
This guide walks through obtaining a free SSL certificate, exporting it from the provider, and configuring a Spring Boot application to use the certificate, including detailed steps, screenshots, and the necessary server.yml configuration.
Preparing to launch an interview project as a mini‑program requires HTTPS; this article records the complete process and pitfalls.
Step 1: Apply for an SSL Certificate
The author chose a free service at https://freessl.cn/ . Users can select a provider based on their needs.
The chosen method is offline generation, which requires domain verification. Alibaba Cloud users can use one‑click generation with an authorization code, but Asian Integrity does not support mini‑programs and only works on a computer.
PS: A required client software must be installed; follow the prompts to automatically verify the domain.
If verification stalls, switch to “one‑click apply” and select “I am not an Alibaba Cloud user” to change from web verification to software verification, which passes instantly.
Step 2: Export the Certificate
Export methods differ per platform; the author demonstrates his approach.
1. Export via the website tool
After using the tool, a ZIP package is downloaded.
Open the IIS folder (not the Tomcat folder; most SSL providers now issue PFX certificates, and using JKS may cause future migration issues).
Additional screenshots show the extraction process.
Step 3: Configuration Code
The article assumes basic Spring Boot knowledge and recommends a practical tutorial:
https://github.com/javastacks/spring-boot-best-practice
server:
port: 443
ssl:
key-store: classpath:aaaaa.pfx
key-store-password: yourpassword
keyStoreType: PKCS12The password is the one set during the certificate export step; any matching password works.
The file name should correspond to the configuration but has no strict requirements.
To the end of the article, the author promotes a Java architecture community and invites readers to join the discussion group.
Java Architect Essentials
Committed to sharing quality articles and tutorials to help Java programmers progress from junior to mid-level to senior architect. We curate high-quality learning resources, interview questions, videos, and projects from across the internet to help you systematically improve your Java architecture skills. Follow and reply '1024' to get Java programming resources. Learn together, grow together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.