Enable HTTP and HTTPS both in SpringBoot 2

Configured the port has to be taken @Value("${http.port}") private int httpPort; Confiure the ServletWebServerFactory @Bean public ServletWebServerFactory servletContainer() { TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory(); tomcat.addAdditionalTomcatConnectors(createStandardConnector()); return tomcat; } private Connector createStandardConnector() { Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol"); connector.setPort(httpPort); return connector; } and use server.port for https port

CER vs CRT

Fundamentally, there is no difference between CER and CRT What we mean is that both are the same SSL certificate format — that is Base64 (ASCII) format — they both are different filename extensions. these extensions are used for certificates, and they’re encoded in binary DER or as ASCII PEM formats. CER & CRT extensions … Continue reading CER vs CRT

Howto convert a PFX to a seperate .key/.crt file

openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key] you need to type in the importpassword of the .pfx file.  This is the password that you used to protect your keypair when you created your .pfx file.  If you cannot remember it anymore you can just throw your .pfx file away, cause you won’t be able to … Continue reading Howto convert a PFX to a seperate .key/.crt file

Docker swam docker_gwbridge network

By default the docker swam will create the network with subnet 172.18.X.X. some case where these subnet is already used. We need to use the different subnet for the docker swam. We have to create the docker_gwbridge before initialising the swam mode. by using following command docker network create \-o com.docker.network.bridge.enable_icc=false \-o com.docker.network.bridge.name=docker_gwbridge \--subnet <subnetIPRange> … Continue reading Docker swam docker_gwbridge network

Monitor Spring Boot applications

Spring Boot Admin is a community project to manage and monitor your Spring Boot ® applications. Setup an Admin ServerRegister Client with Server Admin Server First, you need to setup your server, which is easy thanks to start.spring.io select Web and Spring Boot Admin add the @EnableAdminServer to Spring Boot Application file now run the spring boot application … Continue reading Monitor Spring Boot applications

Expose Local machine to the public internet with out Static IP or a Domain name

Expose a local web server to the internet ngrok allows you to expose a web server running on your local machine to the internet. Just tell ngrok what port your web server is listening on. Just Download it from https://ngrok.com/download unzip it by running the command > unzip /path/to/ngrok.zip Authenticate once ./ngrok authtoken <YOUR_AUTH_TOKEN> and … Continue reading Expose Local machine to the public internet with out Static IP or a Domain name

THE MEANING OF URL, URI, URN AND IRI

Image Source : https://devblast.com/b/url-uri-iri-urn Many people know that a URI is "something like a URL" but do not properly understand the relationship between URI and URL, or indeed its relationship with other acronyms such as IRI and URN. Most people are familiar with URLs (uniform resource locators), such as http://…​, ftp://…​,&nbsp;\mailto:…​:. Put simply, a URL specifies the location of a resource. … Continue reading THE MEANING OF URL, URI, URN AND IRI