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

[5기 - 박주한] SpringBoot Part1 Weekly Mission 제출합니다. #919

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f2c9c74
feat: 패키지 구조 및 io 설정중
ParkJuhan94 Oct 22, 2023
cfd8342
feat: outputhandler 구현
ParkJuhan94 Oct 22, 2023
9028c1b
feat: VoucherController
ParkJuhan94 Oct 22, 2023
8e4db6c
feat: findAll 구현
ParkJuhan94 Oct 23, 2023
1c1d3c5
feat: enum 메시지, 모든 바우처 조회, 바우처 생성
ParkJuhan94 Oct 23, 2023
84c9866
feat: dto 생성, 바우처 controller 구현
ParkJuhan94 Oct 23, 2023
573b02c
feat: findAll 구현
ParkJuhan94 Oct 23, 2023
e5332a5
feat: findAll 포맷팅
ParkJuhan94 Oct 23, 2023
b9cce88
fix: kdtApp 어노테이션 수정
ParkJuhan94 Oct 23, 2023
733abd4
fix: VoucherController 함수 분리
ParkJuhan94 Oct 23, 2023
d271ef9
feat: jar 실행 완료
ParkJuhan94 Oct 23, 2023
d9c6707
feat: 블랙리스트 완료
ParkJuhan94 Oct 23, 2023
5e218dc
fix: 불필요한 파일 정리
ParkJuhan94 Oct 23, 2023
46142df
feat: KdtApplication 고민되는 주석 추가
ParkJuhan94 Oct 26, 2023
ae19c45
feat: customer / 레포 추가 + db 연결
ParkJuhan94 Oct 29, 2023
2e5f463
feat: voucher 테이블 생성 + voucher 필드 추가
ParkJuhan94 Oct 29, 2023
5411e2e
feat: VoucherJdbcRepository 구현
ParkJuhan94 Oct 29, 2023
e64e75d
feat: 메시지 정리 및 Wallet 정의
ParkJuhan94 Oct 29, 2023
d63a9aa
feat: WalletController WalletService 구현
ParkJuhan94 Oct 29, 2023
77814a7
fix: 컨트롤러 구조 변경 리팩토링 완료
ParkJuhan94 Oct 29, 2023
93024ff
feat: Wallet 모두 구현 & 특정 고객이 소유한 바우처 조회 & 특정 바우처를 보유한 고객을 조회
ParkJuhan94 Oct 29, 2023
ce698a4
fix: 불필요한 파일 제거, 네이밍 정리중
ParkJuhan94 Nov 4, 2023
9ff2ba8
fix: KdtApplication, modeController 리팩토링 & VoucherService 분리
ParkJuhan94 Nov 4, 2023
261d0f6
feat: 바우처 조회 & 삭제 구현
ParkJuhan94 Nov 5, 2023
ffe676e
feat: 바우처 타임리프 관리페이지 구현
ParkJuhan94 Nov 5, 2023
fd38f59
fix: voucher 테이블 컬럼 Amount 로 통합 후 리팩토링
ParkJuhan94 Nov 6, 2023
701aba4
fix: enum 설정 및 불필요한 코드 정리
ParkJuhan94 Nov 6, 2023
a092508
feat: api 셋팅 및 추가 구현
ParkJuhan94 Nov 8, 2023
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
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

logs/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/
117 changes: 117 additions & 0 deletions .mvn/wrapper/MavenWrapperDownloader.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/*
* Copyright 2007-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;

public class MavenWrapperDownloader {

private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";

/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";

/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";

/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";

public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());

// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);

File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}

private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}

}
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
Loading