Skip to content

Commit

Permalink
Merge pull request codestates-seb#349 from codestates-seb/revert-348-…
Browse files Browse the repository at this point in the history
…dev-be

Revert "[BE] ✨ μ‹€μ‹œκ°„ μ±„νŒ… κ΅¬ν˜„"
  • Loading branch information
NtoZero authored Dec 8, 2023
2 parents 582f659 + 9f66ecd commit 58d1704
Show file tree
Hide file tree
Showing 133 changed files with 280 additions and 7,499 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ jobs:
AWS_SECRET_KEY: ${{secrets.AWS_SECRET_KEY}}
AWS_BUCKET_NAME: ${{secrets.AWS_BUCKET_NAME}}
ADMIN_EMAIL: ${{secrets.ADMIN_EMAIL}}
GUEST_EMAIL: ${{secrets.GUEST_EMAIL}}
GROWSTORY_EMAIL_USERNAME: ${{secrets.GROWSTORY_EMAIL_USERNAME}}
GROWSTORY_EMAIL_PASSWORD: ${{secrets.GROWSTORY_EMAIL_PASSWORD}}
G_CLIENT_ID: ${{secrets.G_CLIENT_ID}}
G_CLIENT_SECRET: ${{secrets.G_CLIENT_SECRET}}
JWT_SECRET_KEY: ${{secrets.JWT_SECRET_KEY}}
KEY_STORE_PASSWORD: ${{secrets.KEY_STORE_PASSWORD}}
EVENT_KEY: ${{secrets.EVENT_KEY}}
working-directory: ./server

steps:
Expand Down Expand Up @@ -53,14 +51,12 @@ jobs:
--build-arg AWS_SECRET_KEY="${{env.AWS_SECRET_KEY}}" \
--build-arg AWS_BUCKET_NAME="${{env.AWS_BUCKET_NAME}}" \
--build-arg ADMIN_EMAIL="${{env.ADMIN_EMAIL}}" \
--build-arg GUEST_EMAIL="${{env.GUEST_EMAIL}}" \
--build-arg GROWSTORY_EMAIL_USERNAME="${{env.GROWSTORY_EMAIL_USERNAME}}" \
--build-arg GROWSTORY_EMAIL_PASSWORD="${{env.GROWSTORY_EMAIL_PASSWORD}}" \
--build-arg G_CLIENT_ID="${{env.G_CLIENT_ID}}" \
--build-arg G_CLIENT_SECRET="${{env.G_CLIENT_SECRET}}" \
--build-arg JWT_SECRET_KEY="${{env.JWT_SECRET_KEY}}" \
--build-arg KEY_STORE_PASSWORD="${{env.KEY_STORE_PASSWORD}}" \
--build-arg EVENT_KEY="${{env.EVENT_KEY}}" \
-t growstory-cicd .
docker tag growstory-cicd leest/growstory-cicd:${GITHUB_SHA::7}
docker push leest/growstory-cicd:${GITHUB_SHA::7}
Expand All @@ -84,4 +80,4 @@ jobs:
sudo docker rm -f server
sudo docker pull leest/growstory-cicd:${GITHUB_SHA::7}
sudo docker tag leest/growstory-cicd:${GITHUB_SHA::7} growstory-cicd
sudo docker run -d --name server -e TZ=Asia/Seoul -p 443:443 growstory-cicd
sudo docker run -d --name server -e TZ=Asia/Seoul -p 443:443 growstory-cicd
8 changes: 2 additions & 6 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ ARG MYSQL_USER \
MYSQL_PASSWORD \
RDS_ENDPOINT \
ADMIN_EMAIL \
GUEST_EMAIL \
AWS_ACCESS_KEY \
AWS_SECRET_KEY \
AWS_BUCKET_NAME \
Expand All @@ -15,15 +14,13 @@ ARG MYSQL_USER \
GROWSTORY_EMAIL_PASSWORD \
GROWSTORY_EMAIL_USERNAME \
JWT_SECRET_KEY \
KEY_STORE_PASSWORD \
EVENT_KEY
KEY_STORE_PASSWORD

# ⭐ 'ENV' μ˜ˆμ•½μ–΄λ₯Ό 톡해 전달받은 값을 μ‹€μ œ κ°’κ³Ό λ§€μΉ­μ‹œμΌœμ•Ό ν•œλ‹€.
ENV MYSQL_USER=${MYSQL_USER} \
MYSQL_PASSWORD=${MYSQL_PASSWORD} \
RDS_ENDPOINT=${RDS_ENDPOINT} \
ADMIN_EMAIL=${ADMIN_EMAIL} \
GUEST_EMAIL=${GUEST_EMAIL} \
AWS_ACCESS_KEY=${AWS_ACCESS_KEY} \
AWS_SECRET_KEY=${AWS_SECRET_KEY} \
AWS_BUCKET_NAME=${AWS_BUCKET_NAME} \
Expand All @@ -32,8 +29,7 @@ ENV MYSQL_USER=${MYSQL_USER} \
GROWSTORY_EMAIL_PASSWORD=${GROWSTORY_EMAIL_PASSWORD} \
GROWSTORY_EMAIL_USERNAME=${GROWSTORY_EMAIL_USERNAME} \
JWT_SECRET_KEY=${JWT_SECRET_KEY} \
KEY_STORE_PASSWORD=${KEY_STORE_PASSWORD} \
EVENT_KEY=${EVENT_KEY}
KEY_STORE_PASSWORD=${KEY_STORE_PASSWORD}

# (2) COPYμ—μ„œ μ‚¬μš©λ  경둜 λ³€μˆ˜
ARG JAR_FILE=build/libs/*-SNAPSHOT.jar
Expand Down
8 changes: 0 additions & 8 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ dependencies {

// spring-security-test λͺ¨λ“ˆ μΆ”κ°€
testImplementation 'org.springframework.security:spring-security-test'

// websocket
implementation 'org.springframework.boot:spring-boot-starter-websocket'
// implementation 'org.webjars:sockjs-client'
// implementation 'org.webjars:stomp-websocket'
implementation 'org.springframework:spring-messaging'
implementation 'org.springframework.security:spring-security-messaging'

}

test {
Expand Down
312 changes: 0 additions & 312 deletions server/server_log

This file was deleted.

Binary file removed server/server_log.2023-10-04.0.gz
Binary file not shown.
8 changes: 1 addition & 7 deletions server/src/main/java/com/growstory/GrowstoryApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

@EnableScheduling
@EnableJpaAuditing
@EnableAsync
@EnableAspectJAutoProxy
@SpringBootApplication(exclude = {
org.springframework.cloud.aws.autoconfigure.context.ContextInstanceDataAutoConfiguration.class,
org.springframework.cloud.aws.autoconfigure.context.ContextStackAutoConfiguration.class,
org.springframework.cloud.aws.autoconfigure.context.ContextRegionProviderAutoConfiguration.class
})
@SpringBootApplication
public class GrowstoryApplication {

public static void main(String[] args) {
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import com.growstory.global.response.SingleResponseDto;
import com.growstory.global.utils.UriCreator;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
Expand All @@ -36,26 +36,12 @@ public class AccountController {
@Operation(summary = "νšŒμ›κ°€μž…", description = "μ‚¬μš©μž 정보λ₯Ό μž…λ ₯λ°›μ•„ 계정 생성")
@PostMapping("/signup")
public ResponseEntity<HttpStatus> postAccount(@Valid @RequestBody AccountDto.Post accountPostDto) {
AccountDto.Response responseDto = accountService.createAccount(accountPostDto);
URI location = UriCreator.createUri(ACCOUNT_DEFAULT_URL, responseDto.getAccountId());

AccountDto.Response accountResponseDto = accountService.createAccount(accountPostDto);
URI location = UriCreator.createUri(ACCOUNT_DEFAULT_URL, accountResponseDto.getAccountId());

return ResponseEntity.created(location).build();
}

@Operation(summary = "νšŒμ›κ°€μž…", description = "게슀트 계정 생성")
@PostMapping("/guest")
public ResponseEntity<?> postAccount() {
List<String> token = accountService.createAccount();
URI location = UriCreator.createUri(ACCOUNT_DEFAULT_URL, Long.parseLong(token.get(2)));

HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", token.get(0));
headers.add("Refresh", token.get(1));

return ResponseEntity.created(location).headers(headers).build();
}

@Operation(summary = "ν”„λ‘œν•„ 사진 μˆ˜μ •", description = "μž…λ ₯받은 ν”„λ‘œν•„ μ‚¬μ§„μœΌλ‘œ 정보 μˆ˜μ •")
@PatchMapping(value = "/profileimage", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public ResponseEntity<HttpStatus> patchProfileImage(@RequestPart MultipartFile profileImage) {
Expand Down Expand Up @@ -170,12 +156,4 @@ public ResponseEntity<HttpStatus> deleteAccount() {

return ResponseEntity.noContent().build();
}

@Operation(summary = "게슀트 νšŒμ› νƒˆν‡΄", description = "게슀트 μ‚¬μš©μž 계정 μ‚­μ œ")
@DeleteMapping("/guest/{account-id}")
public ResponseEntity<HttpStatus> deleteAccount(@Positive @PathVariable("account-id") Long accountId){
accountService.deleteAccount(accountId);

return ResponseEntity.noContent().build();
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.growstory.domain.account.dto;

import com.growstory.domain.point.entity.Point;
import com.growstory.global.badwords.dto.TextContainer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand All @@ -17,7 +16,7 @@ public class AccountDto {
@Getter
@Builder
@Schema(name = "AccountPostDto")
public static class Post implements TextContainer {
public static class Post {
@NotBlank
private String displayName;

Expand All @@ -28,29 +27,18 @@ public static class Post implements TextContainer {
@NotBlank
@Pattern(regexp = "^(?=.*[a-zA-Z])(?=.*\\d).{6,}$" , message = "영문, 숫자 포함 6κΈ€μž μ΄μƒμ˜ νŒ¨μŠ€μ›Œλ“œλ§Œ ν—ˆμš©ν•©λ‹ˆλ‹€.")
private String password;

@Override
public String combineText() {
return displayName;
}
}


@Getter
@NoArgsConstructor
public static class DisplayNamePatch implements TextContainer {
public static class DisplayNamePatch {
@NotBlank
private String displayName;

@Builder
public DisplayNamePatch(String displayName) {
this.displayName = displayName;
}

@Override
public String combineText() {
return this.displayName;
}
}

@Getter
Expand Down Expand Up @@ -82,7 +70,6 @@ public static class Response {
private Long accountId;
private String email;
private String displayName;
private String status;
private String profileImageUrl;
private String grade;
private Point point;
Expand Down
Loading

0 comments on commit 58d1704

Please sign in to comment.