Commit dd2b4fbd authored by Ansal M A's avatar Ansal M A

updates

parent 5d59da53
......@@ -34,6 +34,14 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
......
......@@ -7,6 +7,8 @@ import com.nisum.poc.api.department.response.DepartmentDetailResponse;
import com.nisum.poc.api.department.service.IDepartmentService;
import org.modelmapper.ModelMapper;
import org.modelmapper.convention.MatchingStrategies;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Mono;
......@@ -15,6 +17,7 @@ import reactor.core.publisher.Mono;
@RequestMapping(value = "/department")
public class DepartmentController {
Logger logger = LoggerFactory.getLogger(DepartmentController.class);
private IDepartmentService departmentService;
@Autowired
......@@ -29,6 +32,8 @@ public class DepartmentController {
@GetMapping("/v1/find/{departmentId}")
public Mono<Department> fetchDepartmentById(@PathVariable Long departmentId){
logger.info("Request Received to Find Dept : {}", departmentId);
return departmentService.findDepartmentById(departmentId);
}
......
......@@ -11,3 +11,10 @@ spring.data.mongodb.port=27017
#api-gateway is calling the microservices using username of the system which you need to call using ip address of the system
eureka.instance.prefer-ip-address=true
logging.file = D:/log/dept-ws.log
spring.sleuth.sampler.probability = 1
#Property to enable actuator end point.
management.endpoint.web.exposure.include = mapping,bean,health,httptrace,routes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment