The goal of this project is to play with HTTPS and enable it in Spring Boot applications. For it, we will implement a Spring Boot Rest API, called movies-api that will have its endpoints ready to accept and server over HTTPS. Furthermore, a Spring Boot Shell Java application, called movies-shell, and a Frontend ReactJS application, called movies-ui, will be implemented to consume movies-api.
-
Spring BootWeb Java application that exposes a Rest API to manage movies. Its endpoints are ready to accept and server overHTTPS.movies-apistores its data inH2memory database. -
Spring BootShell Java application that usesmovies-apito get information about a movie or to even add/delete a movie. All the communication withmovies-apiis overHTTPS. -
ReactJSfrontend application where users can manage movies. All the communication withmovies-apiis overHTTPS. It usesSemantic UI Reactas CSS-styled framework.
-
movies-api
-
Open a terminal and inside
https-springboot-react/movies-apifolder run./mvnw clean spring-boot:run -
Its Swagger website is https://localhost:8443/swagger-ui.html
-
-
movies-shell
-
Open another terminal and inside
https-springboot-react/movies-shellfolder run the command below to package thejar./mvnw clean package -DskipTests -
Still inside
https-springboot-react/movies-shell, run the following command to startmovies-shell./target/movies-shell-0.0.1-SNAPSHOT.jar -
Sample of the shell interface and execution
-
-
movies-ui
-
Open another terminal and go to
https-springboot-react/movies-uifolder -
Execute the command below if you are running it for the first time
npm install -
To start
movies-uirunnpm start -
The url is https://localhost:3443
-
-
In order to create a
PKCS12certificate, run the following commandkeytool -genkeypair -alias localhost \ -keyalg RSA -keysize 2048 -storetype PKCS12 \ -keystore keystore.p12 -validity 3650 \ -dname "CN=localhost, OU=MyCompany, O=MyCompany, L=Berlin, ST=Berlin, C=DE" -
Set a password. In this project, we will use
secretEnter keystore password: secret Re-enter new password: secret -
To list the certificates
keystore.p12run the command below. The password will be requested.keytool -list -v -keystore keystore.p12
-
In a terminal, make sure you are inside
https-springboot-react/movies-uifolder -
Run the following commands
npm i -g npm-check-updates ncu -u npm install


