37 |
인증메일
38 |
안녕하세요. payment-system 입니다.
39 |
회원가입을 위한 인증번호 입니다.
40 |
41 |
만약 우리 사이트에 가입을 원치 않으면 해당 이메일을 무시해주세요.
42 |
좋은 하루 되세요.
43 |
from payment-system project.
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/src/main/java/flab/payment_system/domain/user/entity/User.java:
--------------------------------------------------------------------------------
1 | package flab.payment_system.domain.user.entity;
2 |
3 |
4 | import flab.payment_system.common.data.BaseEntity;
5 | import jakarta.persistence.Column;
6 | import jakarta.persistence.Entity;
7 | import jakarta.persistence.GeneratedValue;
8 | import jakarta.persistence.GenerationType;
9 | import jakarta.persistence.Id;
10 | import jakarta.persistence.Table;
11 | import lombok.Builder;
12 | import lombok.Getter;
13 | import lombok.NoArgsConstructor;
14 | import org.checkerframework.checker.nullness.qual.NonNull;
15 |
16 | @Getter
17 | @NoArgsConstructor
18 | @Entity
19 | @Table(name = "user")
20 | public class User extends BaseEntity {
21 |
22 | @Id
23 | @GeneratedValue(strategy = GenerationType.IDENTITY)
24 | @Column(name = "user_id", columnDefinition = "BIGINT UNSIGNED")
25 | private Long userId;
26 |
27 | @NonNull
28 | @Column(name = "e-mail", columnDefinition = "VARCHAR(350)")
29 | private String email;
30 |
31 | @NonNull
32 | @Column(columnDefinition = "CHAR(60)")
33 | private String password;
34 |
35 | @Builder
36 | public User(String email, String password) {
37 | this.email = email;
38 | this.password = password;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/.github/workflows/sonarcloud-analyze.yml:
--------------------------------------------------------------------------------
1 | name: F-Lab SonarCloud Code Analyze
2 |
3 | on:
4 | pull_request:
5 | types: [opened, synchronize, reopened]
6 | workflow_dispatch:
7 |
8 | env:
9 | CACHED_DEPENDENCIES_PATHS: '**/node_modules'
10 |
11 | jobs:
12 | CodeAnalyze:
13 | runs-on: ubuntu-latest
14 |
15 | steps:
16 | - uses: actions/checkout@v3
17 | with:
18 | fetch-depth: 0
19 |
20 | - name: Set SonarCloud Project Key
21 | run: |
22 | REPO_NAME=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 2)
23 | ORG_NAME=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1)
24 | SONAR_PROJECT_KEY="${ORG_NAME}_${REPO_NAME}"
25 | echo "SONAR_PROJECT_KEY=$SONAR_PROJECT_KEY" >> $GITHUB_ENV
26 |
27 | - name: Analyze with SonarCloud
28 | uses: SonarSource/sonarcloud-github-action@master
29 | id: analyze-sonarcloud
30 | continue-on-error: true
31 | env:
32 | GITHUB_TOKEN: ${{ secrets.SECRET_GITHUB_BOT }}
33 | SONAR_TOKEN: ${{ secrets.SECRET_SONARQUBE }}
34 | with:
35 | args:
36 | -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }}
37 | -Dsonar.organization=f-lab-edu-1
38 |
39 |
--------------------------------------------------------------------------------
/src/main/java/flab/payment_system/domain/product/controller/ProductController.java:
--------------------------------------------------------------------------------
1 | package flab.payment_system.domain.product.controller;
2 |
3 | import flab.payment_system.domain.product.dto.ProductDto;
4 | import flab.payment_system.domain.product.service.ProductService;
5 | import lombok.RequiredArgsConstructor;
6 | import org.springframework.http.ResponseEntity;
7 | import org.springframework.web.bind.annotation.*;
8 |
9 | import java.util.List;
10 |
11 | /*
12 | 해당 프로젝트의 목표는 결제 시스템을 구현하는 것이기 때문에 Product 도메인은
13 | 결제 시스템 구현에 필요한 만큼만 간단히 작성
14 | */
15 | @RestController
16 | @RequiredArgsConstructor
17 | @RequestMapping("/api/v1/product")
18 | public class ProductController {
19 |
20 | private final ProductService productService;
21 |
22 | @GetMapping
23 | public List