Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DepartmentApiService
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ansal M A
DepartmentApiService
Commits
dd2b4fbd
Commit
dd2b4fbd
authored
May 24, 2022
by
Ansal M A
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updates
parent
5d59da53
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
pom.xml
pom.xml
+8
-0
DepartmentController.java
...m/poc/api/department/controller/DepartmentController.java
+5
-0
application.properties
src/main/resources/application.properties
+7
-0
No files found.
pom.xml
View file @
dd2b4fbd
...
...
@@ -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>
...
...
src/main/java/com/nisum/poc/api/department/controller/DepartmentController.java
View file @
dd2b4fbd
...
...
@@ -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
);
}
...
...
src/main/resources/application.properties
View file @
dd2b4fbd
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment