Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
spring-boot-CRUD-project
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
Christopher Cottier
spring-boot-CRUD-project
Commits
fe6fa479
Commit
fe6fa479
authored
Apr 19, 2021
by
ccottier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working local db, working on compose
parent
3ac91f62
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
10 deletions
+38
-10
build.gradle
build.gradle
+1
-0
docker-compose.yml
docker-compose.yml
+28
-0
application.properties
src/main/resources/application.properties
+8
-9
employee.sql
src/main/resources/employee.sql
+1
-1
No files found.
build.gradle
View file @
fe6fa479
...
...
@@ -22,6 +22,7 @@ dependencies {
runtimeOnly
'com.h2database:h2'
testImplementation
'org.springframework.boot:spring-boot-starter-test'
testImplementation
'com.h2database:h2'
compile
'org.postgresql:postgresql:42.2.19.jre7'
}
test
{
...
...
docker-compose.yml
0 → 100644
View file @
fe6fa479
version
:
"
3.5"
services
:
emp_db
:
container_name
:
pgDatabase
image
:
postgres
ports
:
-
3191:5432
networks
:
-
empnetwork
spring_boot
:
container_name
:
employeesApp
image
:
ccottiernsm/employee-service
ports
:
-
8081:8080
depends_on
:
-
emp_db
networks
:
-
empnetwork
networks
:
empnetwork
:
name
:
empnetwork
driver
:
bridge
src/main/resources/application.properties
View file @
fe6fa479
spring.datasource.url
=
jdbc:
h2:mem:dataSource
spring.datasource.driverClassName
=
org.
h2
.Driver
spring.datasource.username
=
sa
spring.datasource.password
=
spring.datasource.url
=
jdbc:
postgresql://localhost:5432/emp_serv_db
spring.datasource.driverClassName
=
org.
postgresql
.Driver
spring.datasource.username
=
emp_serv
spring.datasource.password
=
emp_serv
spring.datasource.schema
=
classpath:employee.sql
spring.jpa.database-platform
=
org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto
=
none
#
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
#
spring.jpa.hibernate.ddl-auto=none
spring.h2.console.enabled
=
true
#
spring.h2.console.enabled=true
management.endpoint.beans.enabled
=
true
management.endpoints.web.exposure.include
=
*
info.app.name
=
Employee Service Application Actuator
#
info.app.name
=
Employee Service Application Actuator
\ No newline at end of file
src/main/resources/employee.sql
View file @
fe6fa479
DROP
TABLE
IF
EXISTS
EMPLOYEE
;
CREATE
TABLE
EMPLOYEE
(
ID
INT
AUTO_INCREMENT
PRIMARY
KEY
,
ID
INT
SERIAL
PRIMARY
KEY
,
FIRST_NAME
VARCHAR
(
255
)
NOT
NULL
,
LAST_NAME
VARCHAR
(
255
)
NOT
NULL
);
...
...
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