Posts

Showing posts from December, 2024

msa

Image
Practical-2- Create a simple microservice using spring boot package com.example.Microservices_demo; import org.springframework.boot.SpringApplication; @SpringBootApplication public class MicroservicesDemoApplication { public static void main(String[] args) {   SpringApplication.run(MicroservicesDemoApplication.class, args); } } Practical-3- Implement Restful APIs in microservice package com.example.Microservices_demo.demo; import org.springframework.web.bind.annotation.GetM@apping; import org.springframework.web.bind.annotation.RestController; @RestController public class MyController {   @GetMapping(“/home”) public String home() {  return “This is home page”; } } Practical-4- Implement Synchronous Communication using REST   package com.example.Microservices_Demo.demo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation...