Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ecom-product
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
Ashok Kumar K
ecom-product
Commits
17d0436f
Commit
17d0436f
authored
Jun 01, 2020
by
Ashok Kumar K
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
externalized config and changed url mapping for ProductController
parent
12ea6ed8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
27 deletions
+23
-27
build.gradle
build.gradle
+14
-1
EcomProductApplication.java
...in/java/com/nisum/ecomproduct/EcomProductApplication.java
+1
-0
ProductController.java
...a/com/nisum/ecomproduct/controller/ProductController.java
+2
-1
application-development.yml
src/main/resources/application-development.yml
+0
-10
application-test.yml
src/main/resources/application-test.yml
+0
-0
application.yml
src/main/resources/application.yml
+0
-14
bootstrap.yml
src/main/resources/bootstrap.yml
+6
-1
No files found.
build.gradle
View file @
17d0436f
...
@@ -18,13 +18,20 @@ repositories {
...
@@ -18,13 +18,20 @@ repositories {
mavenCentral
()
mavenCentral
()
}
}
ext
{
set
(
'springCloudVersion'
,
"Hoxton.SR4"
)
}
dependencies
{
dependencies
{
implementation
'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation
'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation
'org.springframework.boot:spring-boot-starter-validation'
implementation
'org.springframework.boot:spring-boot-starter-validation'
implementation
'org.springframework.boot:spring-boot-starter-web'
implementation
'org.springframework.boot:spring-boot-starter-web'
implementation
'org.springframework.cloud:spring-cloud-starter-config'
implementation
'org.springframework.boot:spring-boot-starter-actuator'
implementation
'org.springframework.boot:spring-boot-starter-actuator'
implementation
'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
// implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
compileOnly
'org.projectlombok:lombok'
compileOnly
'org.projectlombok:lombok'
developmentOnly
'org.springframework.boot:spring-boot-devtools'
//
developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor
'org.projectlombok:lombok'
annotationProcessor
'org.projectlombok:lombok'
compile
"io.springfox:springfox-swagger2:2.9.2"
compile
"io.springfox:springfox-swagger2:2.9.2"
compile
"io.springfox:springfox-swagger-ui:2.9.2"
compile
"io.springfox:springfox-swagger-ui:2.9.2"
...
@@ -33,6 +40,12 @@ dependencies {
...
@@ -33,6 +40,12 @@ dependencies {
}
}
}
}
dependencyManagement
{
imports
{
mavenBom
"org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
test
{
test
{
useJUnitPlatform
()
useJUnitPlatform
()
}
}
src/main/java/com/nisum/ecomproduct/EcomProductApplication.java
View file @
17d0436f
...
@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
...
@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
@SpringBootApplication
public
class
EcomProductApplication
{
public
class
EcomProductApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
src/main/java/com/nisum/ecomproduct/controller/ProductController.java
View file @
17d0436f
...
@@ -3,6 +3,7 @@ package com.nisum.ecomproduct.controller;
...
@@ -3,6 +3,7 @@ package com.nisum.ecomproduct.controller;
import
com.nisum.ecomproduct.model.Product
;
import
com.nisum.ecomproduct.model.Product
;
import
com.nisum.ecomproduct.service.ProductService
;
import
com.nisum.ecomproduct.service.ProductService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.context.config.annotation.RefreshScope
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
...
@@ -11,8 +12,8 @@ import org.springframework.web.bind.annotation.*;
...
@@ -11,8 +12,8 @@ import org.springframework.web.bind.annotation.*;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
java.util.List
;
import
java.util.List
;
@RefreshScope
@RestController
@RestController
@RequestMapping
(
"product"
)
@Validated
@Validated
public
class
ProductController
{
public
class
ProductController
{
...
...
src/main/resources/application-development.yml
View file @
17d0436f
spring
:
data
:
mongodb
:
host
:
localhost
port
:
27017
database
:
ecom
logging
:
level
:
web
:
debug
\ No newline at end of file
src/main/resources/application-test.yml
0 → 100644
View file @
17d0436f
src/main/resources/application.yml
View file @
17d0436f
server
:
server
:
port
:
8011
port
:
8011
spring
:
profiles
:
active
:
development
data
:
mongodb
:
host
:
localhost
port
:
27017
database
:
ecom
management
:
endpoints
:
web
:
exposure
:
include
:
'
*'
src/main/resources/bootstrap.yml
View file @
17d0436f
spring
:
spring
:
application
:
application
:
name
:
ecom-product
name
:
ecom-product
\ No newline at end of file
profiles
:
active
:
development
cloud
:
config
:
uri
:
http://localhost:8888
\ No newline at end of file
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