How to do it...

Let's have a look at the following steps:

  1. Let's create the authentication service. Create a new Java project with the following 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'apply plugin: 'io.spring.dependency-management'sourceCompatibility = 1.8repositories {    mavenCentral()}dependencies {    compile group: 'org.springframework.boot', name: 'spring-boot-starter-web'    compile group: 'org.springframework.security', name: 'spring-security-core' compile group: 'org.springframework.security', ...

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.