Merge pull request #9 from codej99/feature/seperate-profile
seperate environment profile
This commit is contained in:
26
README.md
26
README.md
@@ -25,8 +25,32 @@
|
||||
- Run -> SpringBootApiApplication
|
||||
- Swagger
|
||||
- http://localhost:8080/swagger-ui.html
|
||||
|
||||
### 3. DDL
|
||||
create table user (
|
||||
msrl bigint not null auto_increment,
|
||||
name varchar(100) not null,
|
||||
password varchar(100),
|
||||
provider varchar(100),
|
||||
uid varchar(50) not null,
|
||||
primary key (msrl)
|
||||
) engine=InnoDB;
|
||||
|
||||
create table user_roles (
|
||||
user_msrl bigint not null,
|
||||
roles varchar(255)
|
||||
) engine=InnoDB;
|
||||
|
||||
|
||||
alter table user
|
||||
add constraint UK_a7hlm8sj8kmijx6ucp7wfyt31 unique (uid);
|
||||
|
||||
### 3. 목차
|
||||
alter table user_roles
|
||||
add constraint FKel3d4qj41g0sy1mtp4sh055g7
|
||||
foreign key (user_msrl)
|
||||
references user (msrl);
|
||||
|
||||
### 4. 목차
|
||||
- SpringBoot2로 Rest api 만들기(1) – Intellij Community에서 프로젝트생성
|
||||
- Document
|
||||
- https://daddyprogrammer.org/post/19/spring-boot1-start-intellij/
|
||||
|
||||
16
src/main/resources/application-alpha.yml
Normal file
16
src/main/resources/application-alpha.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
spring:
|
||||
profiles: alpha
|
||||
datasource:
|
||||
url: jdbc:mysql://127.0.0.1:33060/daddyprogrammer?useUnicode=true&autoReconnect=true&characterEncoding=utf8&allowMultiQueries=true&useSSL=false
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: happydaddy
|
||||
password: daddy!@#1004
|
||||
jpa:
|
||||
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
properties.hibernate:
|
||||
hbm2ddl.auto: none
|
||||
format_sql: true
|
||||
showSql: true
|
||||
generate-ddl: false
|
||||
url:
|
||||
base: http://alpha.daddyprogrammer.org
|
||||
18
src/main/resources/application-local.yml
Normal file
18
src/main/resources/application-local.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
server:
|
||||
port: 8080
|
||||
|
||||
spring:
|
||||
profiles: local
|
||||
datasource:
|
||||
url: jdbc:h2:tcp://localhost/~/test
|
||||
driver-class-name: org.h2.Driver
|
||||
username: sa
|
||||
jpa:
|
||||
database-platform: org.hibernate.dialect.H2Dialect
|
||||
properties.hibernate:
|
||||
hbm2ddl.auto: update
|
||||
format_sql: true
|
||||
showSql: true
|
||||
generate-ddl: true
|
||||
url:
|
||||
base: http://localhost:8080
|
||||
@@ -1,20 +1,9 @@
|
||||
server:
|
||||
port: 8080
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:h2:tcp://localhost/~/test
|
||||
driver-class-name: org.h2.Driver
|
||||
username: sa
|
||||
jpa:
|
||||
database-platform: org.hibernate.dialect.H2Dialect
|
||||
properties.hibernate.hbm2ddl.auto: update
|
||||
showSql: true
|
||||
profiles:
|
||||
active: local # 디폴트 환경
|
||||
messages:
|
||||
basename: i18n/exception
|
||||
encoding: UTF-8
|
||||
jwt:
|
||||
secret: govlepel@$&
|
||||
social:
|
||||
kakao:
|
||||
client_id: XXXXXXXXXXXXXXXXXXXXXXXXXX # 앱생성시 받은 REST API 키
|
||||
@@ -23,5 +12,5 @@ spring:
|
||||
login: https://kauth.kakao.com/oauth/authorize
|
||||
token: https://kauth.kakao.com/oauth/token
|
||||
profile: https://kapi.kakao.com/v2/user/me
|
||||
url:
|
||||
base: http://localhost:8080
|
||||
jwt:
|
||||
secret: govlepel@$&
|
||||
|
||||
Reference in New Issue
Block a user