-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #516 from woowacourse-teams/develop
Release: v2.0.0
- Loading branch information
Showing
248 changed files
with
5,855 additions
and
2,683 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Frontend Storybook Deploy To S3 | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
paths: | ||
- frontend/** | ||
- .github/** | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: ./frontend | ||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- name: Use repository source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
|
||
- name: Cache Yarn global cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/.yarn' | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Cache Yarn project cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/.yarn/cache' | ||
key: ${{ runner.os }}-yarn-project-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn-project- | ||
- name: Install dependencies | ||
run: yarn install --immutable | ||
|
||
- name: Build Storybook | ||
run: yarn build:sb | ||
|
||
- name: Upload storybook build files to temp artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Storybook | ||
path: frontend/storybook-static | ||
deploy: | ||
needs: build | ||
runs-on: front-dev-server | ||
steps: | ||
- name: Remove previous version app | ||
working-directory: . | ||
run: rm -rf frontend/storybook | ||
|
||
- name: Download the built file to AWS EC2 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: Storybook | ||
path: frontend/storybook | ||
|
||
- name: Upload to S3 | ||
run: | | ||
aws s3 sync frontend/storybook s3://2023-team-project/2023-zipgo/storybook --delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,43 @@ | ||
# 2023-zipgo | ||
<p align="center"> | ||
<img src="https://github.com/woowacourse-teams/2023-zipgo/assets/24777828/e7eefb82-4bbf-47cd-a6ef-dc756d97c77d" alt="์ง๊ณ README ๋ฐฐ๋" /> | ||
<p align="center"> | ||
<img src="https://img.shields.io/badge/react-v18.2.0-9cf?logo=react" alt="react v18.2.0" /> | ||
<img src="https://img.shields.io/badge/spring_boot-v3.1.1-green?logo=springbootโ alt="spring-boot v3.1.1" /> | ||
<img src="https://img.shields.io/badge/typescript-v5.1.6-blue?logo=typescriptโ alt="typescript v5.1.6"/> | ||
<img src="https://img.shields.io/badge/mysql-v8.0.34-blue?logo=mysql" alt="mysql v8.0.34"/> | ||
</p> | ||
|
||
## ๋ฉค๋ฒ | ||
**์ด๋ณด ์ง์ฌ์ ๋ฐ๋ ค๋๋ฌผ ์ํ ์ ํ์ ๋์์ฃผ๋ ์๋น์ค**, ์ง์ฌ์๊ณ ๋ฏผ์ ๋๋ค. | ||
|
||
| Frontend | Frontend | Frontend | | ||
| :--------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------: | | ||
| <img src="https://avatars.githubusercontent.com/u/24777828?v=4" width=100px alt="์ฒต์ค"/> | <img src="https://avatars.githubusercontent.com/u/79056677?v=4" width=100px alt="๋ ธ์์ด์ฆ"/> | <img src="https://avatars.githubusercontent.com/u/72087183?v=4" width=100px alt="์๋"/> | | ||
| [์ฒต์ค](https://github.com/HyeryongChoi) | [๋ ธ์์ด์ฆ](https://github.com/n0eyes) | [์๋](https://github.com/ksone02) | ||
์ ๋ฌธ๊ฐ๋ค์ ์ฌ๋ฃ ์ ํ ๊ธฐ์ค์ ๋ฌด์์ผ๊น์? | ||
|
||
๋ค์ํ ์ ๋ฌธ๊ฐ๋ค์ด ์ธ์ ํ๋ [์ข์ ์ฌ๋ฃ ์ ํ ๊ธฐ์ค]([https://translucent-mallet-426.notion.site/dae305b85c8146399d7de6a0e74b773d](https://www.notion.so/dae305b85c8146399d7de6a0e74b773d?pvs=21)), **์ง์ฌ์ ๊ณ ๋ฏผ**์์ ํ์ธํ์ธ์! | ||
|
||
| Backend | Backend | Backend | Backend | | ||
|:--------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------:|:----------------------------------:| :----------------------------------:| | ||
| <img src="https://avatars.githubusercontent.com/u/73161212?v=4" width=100px alt="๊ฐ๋น"/> | <img src="https://avatars.githubusercontent.com/u/76938931?v=4" width=100px alt="๋ฌด๋ฏผ"/> | <img src="https://avatars.githubusercontent.com/u/94087228?v=4" width=100px alt="๋ฒ ๋ฒ "/> | <img src="https://avatars.githubusercontent.com/u/61582017?v=4" width=100px alt="๋ก์ง"/> | | ||
| [๊ฐ๋น](https://github.com/iamjooon2) | [๋ฌด๋ฏผ](https://github.com/parkmuhyeun) | [๋ฒ ๋ฒ ](https://github.com/wonyongChoi05) | [๋ก์ง](https://github.com/kyY00n) | ||
- [zipgo.pet](https://zipgo.pet) | ||
- [zipgo.wiki](https://github.com/woowacourse-teams/2023-zipgo/wiki) | ||
|
||
# Skills | ||
|
||
### Frontend Tech Stack | ||
![Frontend Tech Stacks](https://github.com/woowacourse-teams/2023-zipgo/assets/24777828/4372f950-d29e-46a0-807c-79d78a7f6913) | ||
|
||
### Backend Tech Stack | ||
![Backend Tech Stacks](https://github.com/woowacourse-teams/2023-zipgo/assets/24777828/a4643676-e669-43f5-9bb4-d2f4e92ed470) | ||
|
||
# Infra Structure | ||
![Zigo Infra](https://github.com/woowacourse-teams/2023-zipgo/assets/24777828/09847ae1-2aac-41a1-9302-4a2b49a284e0) | ||
|
||
|
||
### Frontend Infra Structure | ||
![image](https://github.com/woowacourse-teams/2023-zipgo/assets/24777828/eac9e8af-2df3-486a-9812-6a39ab36eb4e) | ||
|
||
### Backend Infra Structure | ||
![image](https://github.com/woowacourse-teams/2023-zipgo/assets/24777828/c6b9ec96-1301-4088-98d1-1e1ec1d3b334) | ||
|
||
|
||
# Member | ||
|
||
| [์ฒต์ค](https://github.com/HyeryongChoi) | [๋ ธ์์ด์ฆ](https://github.com/n0eyes) | [์๋](https://github.com/ksone02) | [๊ฐ๋น](https://github.com/iamjooon2) | [๋ฌด๋ฏผ](https://github.com/parkmuhyeun) | [๋ฒ ๋ฒ ](https://github.com/wonyongChoi05) | [๋ก์ง](https://github.com/kyY00n) | | ||
| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | | ||
| <img src="https://avatars.githubusercontent.com/u/24777828?v=4" width=200px alt="์ฒต์ค" /> | <img src="https://avatars.githubusercontent.com/u/79056677?v=4" width=200px alt="๋ ธ์์ด์ฆ" /> | <img src="https://avatars.githubusercontent.com/u/72087183?v=4" width=200px alt="์๋" /> | <img src="https://avatars.githubusercontent.com/u/73161212?v=4" width=200px alt="๊ฐ๋น" /> | <img src="https://avatars.githubusercontent.com/u/76938931?v=4" width=200px alt="๋ฌด๋ฏผ" /> | <img src="https://avatars.githubusercontent.com/u/94087228?v=4" width=200px alt="๋ฒ ๋ฒ "/> | <img src="https://avatars.githubusercontent.com/u/61582017?v=4" width=200px alt="๋ก์ง" /> | | ||
| Frontend | Frontend | Frontend | Backend | Backend | Backend | Backend | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
backend/src/main/java/zipgo/aspect/ConnectionProxyHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package zipgo.aspect; | ||
|
||
import org.springframework.web.context.request.RequestContextHolder; | ||
|
||
import java.lang.reflect.InvocationHandler; | ||
import java.lang.reflect.Method; | ||
|
||
public class ConnectionProxyHandler implements InvocationHandler { | ||
|
||
private static final String QUERY_PREPARE_STATEMENT = "prepareStatement"; | ||
|
||
private final Object connection; | ||
private final QueryCounter queryCounter; | ||
|
||
public ConnectionProxyHandler(Object connection, QueryCounter queryCounter) { | ||
this.connection = connection; | ||
this.queryCounter = queryCounter; | ||
} | ||
|
||
@Override | ||
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { | ||
countQuery(method); | ||
return method.invoke(connection, args); | ||
} | ||
|
||
private void countQuery(Method method) { | ||
if (isPrepareStatement(method) && isRequest()) { | ||
queryCounter.increaseCount(); | ||
} | ||
} | ||
|
||
private boolean isPrepareStatement(Method method) { | ||
return method.getName().equals(QUERY_PREPARE_STATEMENT); | ||
} | ||
|
||
private boolean isRequest() { | ||
return RequestContextHolder.getRequestAttributes() != null; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package zipgo.aspect; | ||
|
||
import lombok.Getter; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.web.context.annotation.RequestScope; | ||
|
||
@Getter | ||
@Component | ||
@RequestScope | ||
public class QueryCounter { | ||
|
||
private int count; | ||
|
||
public void increaseCount() { | ||
count++; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package zipgo.aspect; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.aspectj.lang.ProceedingJoinPoint; | ||
import org.aspectj.lang.annotation.Around; | ||
import org.aspectj.lang.annotation.Aspect; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.lang.reflect.Proxy; | ||
|
||
@Aspect | ||
@Component | ||
@RequiredArgsConstructor | ||
public class QueryCounterAop { | ||
|
||
private final QueryCounter queryCounter; | ||
|
||
@Around("execution(* javax.sql.DataSource.getConnection(..))") | ||
public Object getConnection(ProceedingJoinPoint proceedingJoinPoint) throws Throwable { | ||
Object connection = proceedingJoinPoint.proceed(); | ||
|
||
return Proxy.newProxyInstance( | ||
connection.getClass().getClassLoader(), | ||
connection.getClass().getInterfaces(), | ||
new ConnectionProxyHandler(connection, queryCounter) | ||
); | ||
} | ||
|
||
} |
Oops, something went wrong.