Showing posts with label Tomcat. Show all posts
Showing posts with label Tomcat. Show all posts

How to Change the Default Server Port in Spring-boot

Introduction

Spring Boot initial project (which is generated from spring starter) project comes with an embedded server i.e tomcat. The default port of embedded tomcat is 8080. Changing the default port for the embedded server has multiple ways. Let's find out how.

Using property files

The easiest way to customize Spring Boot embedded server port is by overriding the values of the default properties.

img logo

Configuring two way SSL in Tomcat

Setting up Tomcat to provide self-signed SSL certificates allowing secure client/server communication and relatively easy to set up.  Java provides a handy command-line tool called keytool that you can use to generate keystores.

Generate the Client and Server Keystores : 

By following the instructions below, you will create two keystores:

clientkeystore.jks (for the client to use) and serverkeystore.jks (for the server to use). In order to provide copies of the client’s certificate to the server (and vice versa), you will export public certificates based on the private keys.

img logo