How to do it...

  1. Create a new Java/Gradle project called message-service and add the following content to the build.gradle file:
group 'com.packtpub.microservices'version '1.0-SNAPSHOT'buildscript {    repositories {        mavenCentral()    }    dependencies {        classpath group: 'org.springframework.boot', name: 'spring-boot-gradle-plugin', version: '1.5.9.RELEASE'    }}apply plugin: 'java'apply plugin: 'org.springframework.boot'sourceCompatibility = 1.8repositories {    mavenCentral()}dependencies {    compile group: 'org.springframework.boot', name: 'spring-boot-starter-web'    testCompile group: 'junit', name: 'junit', version: '4.12'}
  1. Create a new package called com.packtpub.microservices.ch03.message and a new class called Application. This will be our service's ...

Get Microservices Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.