Commit 08028905 authored by Alex Segers's avatar Alex Segers

Added spring cloud config, bootstrap.properties, and modified README

parent ac1513fc
......@@ -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
......@@ -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()
}
spring.application.name=nisum-test-service
#spring.cloud.config.uri=http://localhost:8888/
spring.cloud.config.fail-fast=true
spring.profiles.active=dev
......@@ -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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment