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
Siva Naga Someswara Jatla
OTSWithFeign
Commits
a7c4bf9d
Commit
a7c4bf9d
authored
Apr 01, 2020
by
Kali Padhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PE Url added
parent
b09014b4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
OfferDao.java
.../java/com/nisum/offertransactionservice/dao/OfferDao.java
+5
-3
application.properties
src/main/resources/application.properties
+3
-0
No files found.
src/main/java/com/nisum/offertransactionservice/dao/OfferDao.java
View file @
a7c4bf9d
...
...
@@ -5,6 +5,7 @@ import com.nisum.offertransactionservice.model.OfferTransactionResponse;
import
com.nisum.offertransactionservice.model.PERequest
;
import
com.nisum.offertransactionservice.model.PEResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.http.*
;
import
org.springframework.web.client.*
;
...
...
@@ -14,15 +15,16 @@ public class OfferDao {
@Autowired
private
RestTemplate
restTemplate
;
//TODO add promotionEngine url.
private
static
final
String
promotionEngineUrl
=
""
;
@Value
(
"${promotion.engine.calaculate.dicount.url}"
)
private
String
promotionEngineUrl
;
public
OfferTransactionResponse
convertions
(
OfferTransactionRequest
offerTransactionRequest
)
{
return
null
;
}
public
PEResponse
callPE
(
PERequest
peRequest
)
{
ResponseEntity
<
PEResponse
>
peResponse
=
restTemplate
.
exchange
(
promotionEngineUrl
,
HttpMethod
.
POST
,
HttpEntity
.
EMPTY
,
PEResponse
.
class
);
ResponseEntity
<
PEResponse
>
peResponse
=
restTemplate
.
exchange
(
"http://localhost:8081"
+
promotionEngineUrl
,
HttpMethod
.
POST
,
HttpEntity
.
EMPTY
,
PEResponse
.
class
);
return
peResponse
.
getBody
();
}
}
src/main/resources/application.properties
View file @
a7c4bf9d
...
...
@@ -3,3 +3,6 @@
spring.datasource.url
=
jdbc:postgresql://127.0.0.1:5432/user
spring.datasource.username
=
user
spring.datasource.password
=
password123
promotion.engine.calaculate.dicount.url
=
/promotionEngine/calculateDiscount
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