SSL certificate integration in Spring boot Project

SSL certificate integration SSL certificate setting applied in application.properties file To generate self signed SSL certificate use following command: cd src/main/resources keytool -genkeypair -alias local_ssl -keyalg RSA -keysize 2048 -storetype PKCS12 -keystore local-ssl.p12 -validity 365 -ext san=dns:localhost Put following code into application.properties file spring.application.name=ssl-certificate server.port=8443 #server.port=8080 server.ssl.enabled: true server.ssl.key-alias: local_ssl server.ssl.key-store: classpath:local-ssl.p12 server.ssl.key-store-type: PKCS12 server.ssl.key-password: …

Spring and Gradle – adding to the project WebJars Bootstrap

If you wanted to add bootstrap UI CSS and JS files in thymeleaf then you can use following code: <link th:href=”@{/webjars/bootstrap/5.0.0/css/bootstrap.min.css}” rel=”stylesheet” media=”screen” /><script th:src=”@{/webjars/bootstrap/5.0.0/js/bootstrap.min.js}”></script> If those styles are still not loading then refresh project and if you are using spring security then you need to add following code in your extended class of WebSecurityConfigurerAdapter …