Skip to content

lucksolutions/spring-boot-microservice

Repository files navigation

Java Microservice Framework

CircleCI Code Analysis at: https://sonarcloud.io/dashboard?id=microservice

Setup

  1. Build the microservice app
./gradlew build
  1. Start the application
docker-compose up --build

Service Versioning

Different versions will be implemented using the Adapter Based versioning strategy. In this strategy a single build of the application is responsible for providing all versions of the API protocol that are still supported. The latest version model object is “adapted” to the older version JSON formats by wrapping it in a wrapper object.

Clients are required to specify the version of the service they want to use. The version is specified by setting the ‘Accept’ and 'Content-Type' header values to the version number the client is requesting/sending. If the client does not specify a version, the service will return a 415 response. Clients should ignore any unrecognized JSON attributes when parsing responses.

Kafka Integration Testing

  1. Add the following entry to your /etc/hosts file
127.0.0.1	kafka
  1. Download Kafka
  2. Unzip Kafka. The installation directory will be referred to as $KAFKA_HOME
  3. Run the following command to create a requset producer
$KAFKA_HOME/bin/./kafka-console-producer.sh --broker-list localhost:9092 --topic test
  1. Run the following command to create a response consumer
$KAFKA_HOME/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic testResponse --from-beginning
  1. In the producer terminal, type your message. You should then see a response on the consumer console.

Documentation

Endpoints

Public

Admin

  • Log Configuration - /loggers
  • Audit Events - /auditevents

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors