Skip to content

3nterz/springbootwiremock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Spring boot

Local Environment Setup of Tomcat and Sprint Boot App with Embedded Wiremock (HTTP & HTTPS)

Background information

This Spring based project contains code to demonstrate the use of Embedded Wiremock with configuration for recording mapping files from both HTTP and HTTPS target URLs and setting up appropriate keystores and truststores to establish what SSL certificate is seen when accessing the URL through wiremock and also what SSL certificates can be trusted by the wiremock server.

This code in this project provides a WAR file that can be deployed into a Apache Tomcat Server. The WAR file when deployed, programmatically starts wiremock server, and starts recording mode targeting a HTTP URL first, and calls this HTTP endpoint through Wiremock server, using RestAssured framework, in order to automatically generate the mapping files for the HTTP endpoint. The code then stops recording mode for the HTTP endpoint and resets the wiremock cache in order to move on to recording mapping files for a HTTPS URL. This HTTPS URL will be called through Wiremock server, using RestAssured framework configured with truststores and also Oauth 2 authentication.

Software Deployment Dependencies

Software Development Environment

Integrated Software Libraries

Getting Started

Download and install JDK 8

alt text

Download, extract and install Apache Maven 3.x

Download and Install Eclipse

Download the source code and compile the project

mvn clean install -U

  • A target folder will be created if not already existing and a WAR file named WireMockSprintBootDemo.war will be generated.

Setting up Apache Tomcat

Setting up certificates and Java keystores

Deploying WAR file to tomcat

Checking log files

Checking Wiremock mapping files

Import Spring boot maven project into Eclipse

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published