Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
student-personal-details-spring-boot
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
student-details-microservice
student-personal-details-spring-boot
Commits
08028905
Commit
08028905
authored
Apr 12, 2021
by
Alex Segers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added spring cloud config, bootstrap.properties, and modified README
parent
ac1513fc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
5 deletions
+31
-5
README.md
README.md
+2
-2
build.gradle
build.gradle
+22
-0
boostrap.properties
src/main/resources/boostrap.properties
+4
-0
create_tables.sql
src/main/resources/create_tables.sql
+3
-3
No files found.
README.md
View file @
08028905
...
...
@@ -34,8 +34,8 @@ CREATE TABLE student_details
);
# Once we have the files ready, run the commands below to run the SQL in the docker container
docker cp
create_tables.sql student-details-pgdb:/
create_tables.sql
docker cp
./src/main/resources/create_tables.sql student-details-pgdb:
create_tables.sql
docker exec -it student-details-pgdb -d student_details -f create_tables.sql -U postgres
docker cp
insert_data.sql student-details-pgdb:/
insert_data.sql
docker cp
./src/main/resources/insert_data.sql student-details-pgdb:
insert_data.sql
docker exec -it student-details-pgdb psql -d student_details -f insert_data.sql -U postgres
```
\ No newline at end of file
build.gradle
View file @
08028905
...
...
@@ -8,10 +8,21 @@ group = 'com.student'
version
=
'0.0.1-SNAPSHOT'
sourceCompatibility
=
'1.8'
configurations
{
compileOnly
{
extendsFrom
annotationProcessor
}
}
repositories
{
mavenCentral
()
}
ext
{
set
(
'springCloudVersion'
,
"2020.0.2"
)
}
dependencies
{
implementation
'org.springframework.boot:spring-boot-starter-web'
implementation
'org.springframework.boot:spring-boot-starter-data-jpa'
...
...
@@ -19,8 +30,19 @@ dependencies {
implementation
'org.springframework.boot:spring-boot-starter-validation'
runtimeOnly
'org.postgresql:postgresql'
testImplementation
'org.springframework.boot:spring-boot-starter-test'
implementation
'org.springframework.cloud:spring-cloud-starter-config'
implementation
'org.springframework.cloud:spring-cloud-starter-bootstrap:3.0.2'
implementation
"io.springfox:springfox-boot-starter:3.0.0"
}
dependencyManagement
{
imports
{
mavenBom
"org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
test
{
useJUnitPlatform
()
}
src/main/resources/boostrap.properties
0 → 100644
View file @
08028905
spring.application.name
=
nisum-test-service
#spring.cloud.config.uri=http://localhost:8888/
spring.cloud.config.fail-fast
=
true
spring.profiles.active
=
dev
src/main/resources/create_tables.sql
View file @
08028905
...
...
@@ -5,7 +5,7 @@ CREATE TABLE student_details
first_name
VARCHAR
(
100
)
NOT
NULL
,
last_name
VARCHAR
(
100
)
NOT
NULL
,
date_of_birth
DATE
NOT
NULL
,
course
VARCHAR
(
100
)
NOT
NULL
,
INDEX
(
email
)
course
VARCHAR
(
100
)
NOT
NULL
);
CREATE
INDEX
email_index
ON
student_details
(
email
);
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