Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

m #569

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open

m #569

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
07a94d5
commit
donggu1105 Jan 21, 2021
429c140
modified profile
donggu1105 Jan 22, 2021
7f407b8
modified profile
donggu1105 Jan 22, 2021
dd9c359
modified profile
donggu1105 Jan 22, 2021
2d21007
add application-real.properties
donggu1105 Jan 22, 2021
5d3be42
add application-real.properties
donggu1105 Jan 22, 2021
5a544b4
add application-real.properties
donggu1105 Jan 23, 2021
684b6a7
add application-real.properties
donggu1105 Jan 26, 2021
43c11d1
add application-real.properties
donggu1105 Jan 26, 2021
f34f90b
add annotation
donggu1105 Jan 26, 2021
73514f6
test
donggu1105 Jan 28, 2021
e8eeb90
test
donggu1105 Jan 28, 2021
5188a33
test
donggu1105 Jan 28, 2021
93d907f
test
donggu1105 Jan 28, 2021
2dd6497
modify .travis.yml
donggu1105 Jan 28, 2021
e552d13
modify
donggu1105 Feb 2, 2021
7dcb817
modify
donggu1105 Feb 2, 2021
b8a589b
modify travis.yml
donggu1105 Feb 2, 2021
efe0266
modify travis.yml
donggu1105 Feb 2, 2021
4140205
modify travis.yml
donggu1105 Feb 2, 2021
ada75bd
modify travis.yml
donggu1105 Feb 2, 2021
d964c3a
modify travis.yml
donggu1105 Feb 2, 2021
b432dab
modify travis.yml
donggu1105 Feb 2, 2021
4f5771d
modify travis.yml
donggu1105 Feb 2, 2021
6f6573a
modify travis.yml
donggu1105 Feb 2, 2021
a4b6d69
modify travis.yml
donggu1105 Feb 2, 2021
0e2ebe0
modify travis.yml
donggu1105 Feb 2, 2021
6682ee9
modify travis.yml
donggu1105 Feb 2, 2021
bb0a890
modify travis.yml
donggu1105 Feb 3, 2021
1754cb7
modify travis.yml
donggu1105 Feb 3, 2021
ba348c0
modify travis.yml
donggu1105 Feb 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ cache:
script: "./gradlew clean build"

before_deploy:
- mkdir -p before-deploy # zip에 포함시킬 파일들을 담을 디렉토리 생성
- mkdir -p before-deploy #zip에 포함시킬 파일들을 담을 디렉토리 생성
- cp scripts/*.sh before-deploy/
- cp appspec.yml before-deploy/
- cp build/libs/*.jar before-deploy/
- cd before-deploy && zip -r before-deploy * # before-deploy로 이동후 전체 압축
- cd ../ && mkdir -p deploy # 상위 디렉토리로 이동후 deploy 디렉토리 생성
- mv before-deploy/before-deploy.zip deploy/freelec-springboot2-webservice.zip # deploy로 zip파일 이동
- cd before-deploy && zip -r before-deploy * #before-deploy로 이동 후 전체압축
- cd ../ && mkdir -p deploy
- mv before-deploy/before-deploy.zip deploy/freelec-springboot2-webservice.zip

deploy:
- provider: s3
access_key_id: $AWS_ACCESS_KEY # Travis repo settings에 설정된 값
secret_access_key: $AWS_SECRET_KEY # Travis repo settings에 설정된 값
bucket: freelec-springboot-build # S3 버킷
bucket: freelec-springboot-builddd # S3 버킷
region: ap-northeast-2
skip_cleanup: true
acl: private # zip 파일 접근을 private으로
Expand All @@ -37,7 +37,7 @@ deploy:
- provider: codedeploy
access_key_id: $AWS_ACCESS_KEY # Travis repo settings에 설정된 값
secret_access_key: $AWS_SECRET_KEY # Travis repo settings에 설정된 값
bucket: freelec-springboot-build # S3 버킷
bucket: freelec-springboot-builddd # S3 버킷
key: freelec-springboot2-webservice.zip # 빌드 파일을 압축해서 전달
bundle_type: zip
application: freelec-springboot2-webservice # 웹 콘솔에서 등록한 CodeDeploy 어플리케이션
Expand All @@ -49,4 +49,4 @@ deploy:
notifications:
email:
recipients:
- jojoldu@gmail.com
- kbh11051@gmail.com
18 changes: 5 additions & 13 deletions appspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 0.0
os: linux
files:
- source: /
destination: /home/ec2-user/app/step3/zip/
destination: /home/ec2-user/app/step2/zip/
overwrite: yes

permissions:
Expand All @@ -12,15 +12,7 @@ permissions:
group: ec2-user

hooks:
AfterInstall:
- location: stop.sh # 엔진엑스와 연결되어 있지 않은 스프링 부트를 종료합니다.
timeout: 60
runas: ec2-user
ApplicationStart:
- location: start.sh # 엔진엑스와 연결되어 있지 않은 Port로 새 버전의 스프링 부트를 시작합니다.
timeout: 60
runas: ec2-user
ValidateService:
- location: health.sh # 새 스프링 부트가 정상적으로 실행됐는지 확인 합니다.
timeout: 60
runas: ec2-user
ApplicationStart:
- location : deploy.sh
timeout : 60
runas: ec2-user
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

group 'com.jojoldu.book'
version '1.0.4-SNAPSHOT-'+new Date().format("yyyyMMddHHmmss")
version '1.0.5-SNAPSHOT-'+new Date().format("yyyyMMddHHmmss")
sourceCompatibility = 1.8

repositories {
Expand All @@ -31,6 +31,7 @@ dependencies {
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-mustache')
compile('com.h2database:h2')
compile('org.mariadb.jdbc:mariadb-java-client')

compile('org.springframework.boot:spring-boot-starter-oauth2-client')
compile('org.springframework.session:spring-session-jdbc')
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.gradle.jvmargs=-Xmx1536m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

//login annotation
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface LoginUser {
Expand Down
10 changes: 6 additions & 4 deletions src/main/resources/application-oauth.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
spring.security.oauth2.client.registration.google.client-id=구글클라이언트ID
spring.security.oauth2.client.registration.google.client-secret=구글클라이언트시크릿
spring.security.oauth2.client.registration.google.client-id=282098600293-elskch6lntksqvq3a73cde38ss9g9bno.apps.googleusercontent.com
spring.security.oauth2.client.registration.google.client-secret=H9jjsbkYA3To0WamEGBrj_MR
spring.security.oauth2.client.registration.google.scope=profile,email

# registration
spring.security.oauth2.client.registration.naver.client-id=네이버클라이언트ID
spring.security.oauth2.client.registration.naver.client-secret=네이버클라이언트시크릿
spring.security.oauth2.client.registration.naver.client-id=2tcXMT6_qOGw3PxjYM4p
spring.security.oauth2.client.registration.naver.client-secret=ld0WuBgvCb
spring.security.oauth2.client.registration.naver.redirect-uri={baseUrl}/{action}/oauth2/code/{registrationId}
spring.security.oauth2.client.registration.naver.authorization-grant-type=authorization_code
spring.security.oauth2.client.registration.naver.scope=name,email,profile_image
Expand All @@ -16,3 +16,5 @@ spring.security.oauth2.client.provider.naver.token-uri=https://nid.naver.com/oau
spring.security.oauth2.client.provider.naver.user-info-uri=https://openapi.naver.com/v1/nid/me
spring.security.oauth2.client.provider.naver.user-name-attribute=response



6 changes: 0 additions & 6 deletions src/main/resources/application-real-db.properties

This file was deleted.

4 changes: 3 additions & 1 deletion src/main/resources/application-real.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
spring.profiles.include=oauth,real-db
spring.jpa.show_sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
spring.session.store-type=jdbc
spring.h2.console.enabled=true
spring.session.store-type=jdbc
4 changes: 0 additions & 4 deletions src/main/resources/application-real1.properties

This file was deleted.

4 changes: 0 additions & 4 deletions src/main/resources/application-real2.properties

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
spring.profiles.include=real-oauth
spring.profiles.include=oauth
spring.jpa.show_sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
spring.h2.console.enabled=true
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/index.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{>layout/header}}

<h1>스프링부트로 시작하는 웹 서비스 Ver.2</h1>
<h1>스프링부트로 시작하는 웹 서비스˚</h1>
<div class="col-md-12">
<div class="row">
<div class="col-md-6">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void cleanup() {
}

@Test
public void 게시글저장_불러오기() {
public void 게시글저장_불러오기2() {
//given
String title = "테스트 게시글";
String content = "테스트 본문";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class IndexControllerTest {
private TestRestTemplate restTemplate;

@Test
public void 메인페이지_로딩() {
public void 메인페이지_로딩테스트12() {
//when
String body = this.restTemplate.getForObject("/", String.class);

Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion src/test/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialec
spring.h2.console.enabled=true
spring.session.store-type=jdbc

# Test OAuth

# Test OAuth
spring.security.oauth2.client.registration.google.client-id=test
spring.security.oauth2.client.registration.google.client-secret=test
spring.security.oauth2.client.registration.google.scope=profile,email