Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.showcase.synapse.sales
Project
Project
Details
Activity
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
com.showcase.synapse
com.showcase.synapse.sales
Commits
7e258e25
Commit
7e258e25
authored
Sep 27, 2023
by
Hyunsu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stage에 따라 별도의 환경 설정 (application.yml)이 적용 될 수 있도록 한다. -Dprofile=dev
parent
862624cf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
7 deletions
+51
-7
Dockerfile
Dockerfile
+1
-1
build.gradle
build.gradle
+16
-2
application.yml
src/main/resources-dev/application.yml
+4
-4
application.yml
src/main/resources-prd/application.yml
+30
-0
No files found.
Dockerfile
View file @
7e258e25
FROM
openjdk:11.0.13-slim
FROM
openjdk:11.0.13-slim
ARG
JAR_FILE=build/libs/order-0.0.1-SNAPSHOT.jar
ARG
JAR_FILE=build/libs/order-0.0.1-SNAPSHOT.jar
COPY
${JAR_FILE} app.jar
COPY
${JAR_FILE} app.jar
ENTRYPOINT
["java","-jar","/app.jar"]
ENTRYPOINT
["java","-jar
-Dspring.profiles.active=prod
","/app.jar"]
build.gradle
View file @
7e258e25
...
@@ -21,8 +21,6 @@ repositories {
...
@@ -21,8 +21,6 @@ repositories {
dependencies
{
dependencies
{
implementation
'org.springframework.boot:spring-boot-starter-data-jpa'
implementation
'org.springframework.boot:spring-boot-starter-data-jpa'
implementation
'org.springframework.boot:spring-boot-starter-web'
implementation
'org.springframework.boot:spring-boot-starter-web'
// implementation 'mysql:mysql-connector-java'
implementation
'org.postgresql:postgresql'
implementation
'org.projectlombok:lombok'
implementation
'org.projectlombok:lombok'
runtimeOnly
'com.h2database:h2'
runtimeOnly
'com.h2database:h2'
annotationProcessor
'org.projectlombok:lombok'
annotationProcessor
'org.projectlombok:lombok'
...
@@ -30,6 +28,22 @@ dependencies {
...
@@ -30,6 +28,22 @@ dependencies {
// https://mvnrepository.com/artifact/org.axonframework/axon-spring-boot-starter
// https://mvnrepository.com/artifact/org.axonframework/axon-spring-boot-starter
implementation
group:
'org.axonframework'
,
name:
'axon-spring-boot-starter'
,
version:
'4.5.14'
implementation
group:
'org.axonframework'
,
name:
'axon-spring-boot-starter'
,
version:
'4.5.14'
implementation
group:
'org.axonframework'
,
name:
'axon-configuration'
,
version:
"4.5.14"
implementation
group:
'org.axonframework'
,
name:
'axon-configuration'
,
version:
"4.5.14"
// Postgresql
implementation
'org.postgresql:postgresql'
implementation
group:
'org.postgresql'
,
name:
'postgresql'
,
version:
'42.2.23'
// 추가
runtimeOnly
'org.postgresql:postgresql'
// 추가
}
// Default는 dev 로 지정
ext
.
profile
=
(!
project
.
hasProperty
(
'profile'
)
||
!
profile
)
?
'dev'
:
profile
// 리소스 폴더 지정
sourceSets
{
main
{
resources
{
srcDirs
"src/main/resources"
,
"src/main/resources-${profile}"
}
}
}
}
tasks
.
named
(
'test'
)
{
tasks
.
named
(
'test'
)
{
...
...
src/main/resources/application.yml
→
src/main/resources
-dev
/application.yml
View file @
7e258e25
...
@@ -7,7 +7,7 @@ axon:
...
@@ -7,7 +7,7 @@ axon:
serializer
:
serializer
:
general
:
xstream
general
:
xstream
axonserver
:
axonserver
:
servers
:
localhost
:8124
servers
:
192.168.0.100
:8124
server
:
server
:
port
:
9093
port
:
9093
...
@@ -15,11 +15,11 @@ server:
...
@@ -15,11 +15,11 @@ server:
spring
:
spring
:
datasource
:
datasource
:
driver-class-name
:
org.postgresql.Driver
driver-class-name
:
org.postgresql.Driver
url
:
jdbc:postgresql://
localhost:5432/postgres
url
:
jdbc:postgresql://
192.168.0.100:25432/showcase1
# driver-class-name: com.mysql.cj.jdbc.Driver
# driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://localhost:3306/msatest
# url: jdbc:mysql://localhost:3306/msatest
username
:
postgres
username
:
showcase1
password
:
admin
password
:
deloitte01!
jpa
:
jpa
:
# show-sql: true
# show-sql: true
...
...
src/main/resources-prd/application.yml
0 → 100644
View file @
7e258e25
#axon:
# serializer:
# general: jackson
# events: jackson
# messages: jackson
axon
:
serializer
:
general
:
xstream
axonserver
:
servers
:
192.168.0.100:8124
server
:
port
:
9093
spring
:
datasource
:
driver-class-name
:
org.postgresql.Driver
url
:
jdbc:postgresql://192.168.0.100:25432/showcase1
# driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://localhost:3306/msatest
username
:
showcase1
password
:
deloitte01!
jpa
:
# show-sql: true
hibernate
:
ddl-auto
:
update
# dialect: org.hibernate.dialect.H2Dialect
properties
:
format_sql
:
true
\ 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