Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OTSWithFeign
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
Bhaskar Katakam
OTSWithFeign
Commits
4d78a549
Commit
4d78a549
authored
May 08, 2020
by
sgandhi@nisum.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EPE-006 : Added integration test cases
parent
94ffb6c5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
8 deletions
+13
-8
CustomCreatedCustomException.java
...ervice/genericexception/CustomCreatedCustomException.java
+1
-1
FeignExceptionHandler.java
...ffertransactionservice/handler/FeignExceptionHandler.java
+1
-1
EndOfTransactionService.java
...ertransactionservice/service/EndOfTransactionService.java
+10
-4
OfferCallingPEService.java
...ffertransactionservice/service/OfferCallingPEService.java
+1
-2
No files found.
src/main/java/com/nisum/offertransactionservice/
service
/CustomCreatedCustomException.java
→
src/main/java/com/nisum/offertransactionservice/
genericexception
/CustomCreatedCustomException.java
View file @
4d78a549
package
com
.
nisum
.
offertransactionservice
.
service
;
package
com
.
nisum
.
offertransactionservice
.
genericexception
;
import
feign.FeignException
;
import
feign.FeignException
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
...
src/main/java/com/nisum/offertransactionservice/handler/FeignExceptionHandler.java
View file @
4d78a549
package
com
.
nisum
.
offertransactionservice
.
handler
;
package
com
.
nisum
.
offertransactionservice
.
handler
;
import
com.nisum.offertransactionservice.
service
.CustomCreatedCustomException
;
import
com.nisum.offertransactionservice.
genericexception
.CustomCreatedCustomException
;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
...
...
src/main/java/com/nisum/offertransactionservice/service/EndOfTransactionService.java
View file @
4d78a549
package
com
.
nisum
.
offertransactionservice
.
service
;
package
com
.
nisum
.
offertransactionservice
.
service
;
import
com.nisum.offertransactionservice.client.StoreProducerFeignClient
;
import
com.nisum.offertransactionservice.client.StoreProducerFeignClient
;
import
com.nisum.offertransactionservice.genericexception.CustomCreatedCustomException
;
import
com.nisum.offertransactionservice.genericexception.GlobalApiGenericException
;
import
com.nisum.offertransactionservice.genericexception.GlobalApiGenericException
;
import
feign.FeignException
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.context.annotation.PropertySource
;
...
@@ -26,10 +28,14 @@ public class EndOfTransactionService {
...
@@ -26,10 +28,14 @@ public class EndOfTransactionService {
log
.
error
(
"Offer transaction uuid is empty or null"
);
log
.
error
(
"Offer transaction uuid is empty or null"
);
throw
new
GlobalApiGenericException
(
"Unable to get the Offer transaction uuid "
,
new
Exception
(
"exception e"
),
"400"
,
false
);
throw
new
GlobalApiGenericException
(
"Unable to get the Offer transaction uuid "
,
new
Exception
(
"exception e"
),
"400"
,
false
);
}
}
log
.
info
(
"Store Consumer WebClient call Start"
);
log
.
info
(
"Store Consumer Feignclient call Start"
);
ResponseEntity
<
String
>
endOfTransactionRes
=
storeProducerFeignClient
.
callStoreProducer
(
uuid
);
try
{
log
.
debug
(
"Store consumer WebClient call End"
);
ResponseEntity
<
String
>
endOfTransactionRes
=
storeProducerFeignClient
.
callStoreProducer
(
uuid
);
return
endOfTransactionRes
.
getBody
();
log
.
debug
(
"Store consumer Feignclient call End"
);
return
endOfTransactionRes
.
getBody
();
}
catch
(
FeignException
e
){
throw
new
CustomCreatedCustomException
(
e
.
status
(),
e
.
contentUTF8
());
}
}
}
...
...
src/main/java/com/nisum/offertransactionservice/service/OfferCallingPEService.java
View file @
4d78a549
...
@@ -2,18 +2,17 @@ package com.nisum.offertransactionservice.service;
...
@@ -2,18 +2,17 @@ package com.nisum.offertransactionservice.service;
import
com.nisum.offertransactionservice.client.PromotionEngineFeignClient
;
import
com.nisum.offertransactionservice.client.PromotionEngineFeignClient
;
import
com.nisum.offertransactionservice.client.StoreProducerFeignClient
;
import
com.nisum.offertransactionservice.converter.OfferConvertion
;
import
com.nisum.offertransactionservice.converter.OfferConvertion
;
import
com.nisum.offertransactionservice.dao.OfferLookupRepo
;
import
com.nisum.offertransactionservice.dao.OfferLookupRepo
;
import
com.nisum.offertransactionservice.dao.OfferMetaDataRepo
;
import
com.nisum.offertransactionservice.dao.OfferMetaDataRepo
;
import
com.nisum.offertransactionservice.dto.*
;
import
com.nisum.offertransactionservice.dto.*
;
import
com.nisum.offertransactionservice.genericexception.CustomCreatedCustomException
;
import
com.nisum.offertransactionservice.genericexception.GlobalApiGenericException
;
import
com.nisum.offertransactionservice.genericexception.GlobalApiGenericException
;
import
com.nisum.offertransactionservice.model.*
;
import
com.nisum.offertransactionservice.model.*
;
import
feign.FeignException
;
import
feign.FeignException
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.mapstruct.factory.Mappers
;
import
org.mapstruct.factory.Mappers
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
...
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