SlideShare a Scribd company logo
Microservices
Components
SpringBoot - Deployment
@RestController
@SpringBootApplication
public class Application {
@RequestMapping("/")
public String home() {
return "Hello World";
}
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
Eureka - Discovery Server
@EnableEurekaServer
@SpringBootApplication
public class Application {
public static void main(String[] args) {
new SpringApplicationBuilder(Application.class)
.web(true).run(args);
}
}
Eureka - Discovery Client
@EnableEurekaClient
@SpringBootApplication
public class Application {
public static void main(String[] args) {
new SpringApplicationBuilder(Application.class)
.web(true).run(args);
}
}
Discovery Client Config
application.yml
eureka:
client:
serviceUrl:
defaultZone: http://localhost:8761/eureka/
Zuul - Dynamic Proxy
@EnableZuulProxy
@SpringBootApplication
public class Application {
public static void main(String[] args) {
new SpringApplicationBuilder(Application.class)
.web(true).run(args);
}
}
JAX-RS Jersey Support - 1
@Component
@Path("/hello")
public class Endpoint {
@GET
public String message() {
return "Hello";
}
}
JAX-RS Jersey Support - 2
@Component
public class JerseyConfig extends ResourceConfig {
public JerseyConfig() {
register(Endpoint.class);
}
}
OAuth2 - 1
@RestController
@EnableOAuth2Resource
@SpringBootApplication
public class Application {
@RequestMapping("/")
public String home() {
return "Hello World";
}
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
OAuth2 - 2
application.yml
oauth2:
resource:
jwt:
keyValue: |
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC...
-----END PUBLIC KEY-----
Module Structure
appnexus-domain
appnexus-repo
appnexus-service
appnexus-domain
appnexus-repo
appnexus-service
appnexus-api
Feign - Rest client - 1
@EnableFeignClients
@SpringBootApplication
public class Application {
public static void main(String[] args) {
new SpringApplicationBuilder(Application.class)
.web(true).run(args);
}
}
Feign - Rest client
@FeignClient("stores")
public interface StoreClient {
@GET
@Path("/stores")
List<Store> getStores();
@POST
@Path("/stores/{storeId}")
Store update(@PathParam("storeId") Long storeId,
@RequestBody Store store);
}
End

More Related Content

ODP
Introduction to Akka Streams [Part-I]
ODP
Introduction to Akka Streams [Part-II]
PDF
Apollo. The client we deserve
ODP
Understanding Spark Structured Streaming
PDF
Spring Boot Actuator 2.0 & Micrometer
PDF
From Ceilometer to Telemetry: not so alarming!
PDF
React Context API
PDF
Introduction to React Hooks
Introduction to Akka Streams [Part-I]
Introduction to Akka Streams [Part-II]
Apollo. The client we deserve
Understanding Spark Structured Streaming
Spring Boot Actuator 2.0 & Micrometer
From Ceilometer to Telemetry: not so alarming!
React Context API
Introduction to React Hooks

What's hot (20)

PDF
Retrofit
PDF
Workshop 22: React-Redux Middleware
PDF
Full-Stack Reactive with Spring WebFlux + Angular - Oracle Code One 2018
PPTX
Airflow presentation
PDF
Sagas Middleware Architecture
PDF
React table tutorial use filter (part 2)
PDF
Evan Schultz - Angular Camp - ng2-redux
PPTX
Azure Durable Functions
PDF
Martin Anderson - threads v actors
PDF
Designing applications with Redux
PDF
Implement react pagination with react hooks and react paginate
PDF
React js use contexts and useContext hook
PDF
An Introduction to Redux
PDF
Retrofit library for android
PPTX
Damian Kmiecik - Road trip with Redux
PPTX
Functional Reactive Endpoints using Spring 5
PDF
Serverless Angular, Material, Firebase and Google Cloud applications
PDF
Introduction to ReactJS and Redux
PDF
Redux data flow with angular 2
PDF
React custom renderers
Retrofit
Workshop 22: React-Redux Middleware
Full-Stack Reactive with Spring WebFlux + Angular - Oracle Code One 2018
Airflow presentation
Sagas Middleware Architecture
React table tutorial use filter (part 2)
Evan Schultz - Angular Camp - ng2-redux
Azure Durable Functions
Martin Anderson - threads v actors
Designing applications with Redux
Implement react pagination with react hooks and react paginate
React js use contexts and useContext hook
An Introduction to Redux
Retrofit library for android
Damian Kmiecik - Road trip with Redux
Functional Reactive Endpoints using Spring 5
Serverless Angular, Material, Firebase and Google Cloud applications
Introduction to ReactJS and Redux
Redux data flow with angular 2
React custom renderers
Ad

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Empathic Computing: Creating Shared Understanding
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Electronic commerce courselecture one. Pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Machine learning based COVID-19 study performance prediction
Empathic Computing: Creating Shared Understanding
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Network Security Unit 5.pdf for BCA BBA.
Encapsulation_ Review paper, used for researhc scholars
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Unlocking AI with Model Context Protocol (MCP)
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
The AUB Centre for AI in Media Proposal.docx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
MIND Revenue Release Quarter 2 2025 Press Release
Diabetes mellitus diagnosis method based random forest with bat algorithm
20250228 LYD VKU AI Blended-Learning.pptx
Review of recent advances in non-invasive hemoglobin estimation
Understanding_Digital_Forensics_Presentation.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Advanced methodologies resolving dimensionality complications for autism neur...
Electronic commerce courselecture one. Pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Ad

Microservices - Components