├── .gitignore ├── .gradle ├── 8.2.1 │ ├── checksums │ │ ├── checksums.lock │ │ ├── md5-checksums.bin │ │ └── sha1-checksums.bin │ ├── dependencies-accessors │ │ ├── dependencies-accessors.lock │ │ └── gc.properties │ ├── executionHistory │ │ └── executionHistory.lock │ ├── fileChanges │ │ └── last-build.bin │ ├── fileHashes │ │ └── fileHashes.lock │ └── gc.properties ├── buildOutputCleanup │ ├── buildOutputCleanup.lock │ └── cache.properties └── vcs-1 │ └── gc.properties ├── HELP.md ├── README.md ├── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── out └── production │ └── resources │ └── application.properties ├── settings.gradle ├── src ├── main │ ├── java │ │ └── com │ │ │ └── fastcampus │ │ │ └── boardserver │ │ │ ├── BoardServerApplication.java │ │ │ ├── aop │ │ │ ├── LoginCheck.java │ │ │ └── LoginCheckAspect.java │ │ │ ├── config │ │ │ ├── DatabaseConfig.java │ │ │ └── MySQLConfig.java │ │ │ ├── controller │ │ │ ├── CategoryController.java │ │ │ ├── PostController.java │ │ │ └── UserController.java │ │ │ ├── dto │ │ │ ├── CategoryDTO.java │ │ │ ├── PostDTO.java │ │ │ ├── UserDTO.java │ │ │ ├── request │ │ │ │ ├── UserDeleteId.java │ │ │ │ ├── UserLoginRequest.java │ │ │ │ └── UserUpdatePasswordRequest.java │ │ │ └── response │ │ │ │ ├── CommonResponse.java │ │ │ │ ├── LoginResponse.java │ │ │ │ └── UserInfoResponse.java │ │ │ ├── exception │ │ │ └── DuplicateIdException.java │ │ │ ├── mapper │ │ │ ├── CategoryMapper.java │ │ │ ├── PostMapper.java │ │ │ └── UserProfileMapper.java │ │ │ ├── service │ │ │ ├── CategoryService.java │ │ │ ├── PostService.java │ │ │ ├── UserService.java │ │ │ └── impl │ │ │ │ ├── CategoryServiceImpl.java │ │ │ │ ├── PostServiceImpl.java │ │ │ │ └── UserServiceImpl.java │ │ │ └── utils │ │ │ ├── SHA256Util.java │ │ │ └── SessionUtil.java │ └── resources │ │ ├── application.properties │ │ ├── mappers │ │ ├── categoryMapper.xml │ │ ├── postMapper.xml │ │ └── userMapper.xml │ │ └── mybatis-config.xml └── test │ └── java │ └── com │ └── fastcampus │ └── boardserver │ └── BoardServerApplicationTests.java ├── 게시판 서버 아키텍처.drawio ├── 게시판 서버 아키텍처.drawio.png ├── 이슈별 실습 내용.drawio └── 이슈별 실습 내용.drawio.png /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | /out/ 3 | /.gradle/ 4 | -------------------------------------------------------------------------------- /.gradle/8.2.1/checksums/checksums.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccommit-dev/Board-Server/94c9c585e9bd7230727fab8d0e081fc8da5c73c5/.gradle/8.2.1/checksums/checksums.lock -------------------------------------------------------------------------------- /.gradle/8.2.1/checksums/md5-checksums.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccommit-dev/Board-Server/94c9c585e9bd7230727fab8d0e081fc8da5c73c5/.gradle/8.2.1/checksums/md5-checksums.bin -------------------------------------------------------------------------------- /.gradle/8.2.1/checksums/sha1-checksums.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccommit-dev/Board-Server/94c9c585e9bd7230727fab8d0e081fc8da5c73c5/.gradle/8.2.1/checksums/sha1-checksums.bin -------------------------------------------------------------------------------- /.gradle/8.2.1/dependencies-accessors/dependencies-accessors.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccommit-dev/Board-Server/94c9c585e9bd7230727fab8d0e081fc8da5c73c5/.gradle/8.2.1/dependencies-accessors/dependencies-accessors.lock -------------------------------------------------------------------------------- /.gradle/8.2.1/dependencies-accessors/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccommit-dev/Board-Server/94c9c585e9bd7230727fab8d0e081fc8da5c73c5/.gradle/8.2.1/dependencies-accessors/gc.properties -------------------------------------------------------------------------------- /.gradle/8.2.1/executionHistory/executionHistory.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccommit-dev/Board-Server/94c9c585e9bd7230727fab8d0e081fc8da5c73c5/.gradle/8.2.1/executionHistory/executionHistory.lock -------------------------------------------------------------------------------- /.gradle/8.2.1/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gradle/8.2.1/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccommit-dev/Board-Server/94c9c585e9bd7230727fab8d0e081fc8da5c73c5/.gradle/8.2.1/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /.gradle/8.2.1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccommit-dev/Board-Server/94c9c585e9bd7230727fab8d0e081fc8da5c73c5/.gradle/8.2.1/gc.properties -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccommit-dev/Board-Server/94c9c585e9bd7230727fab8d0e081fc8da5c73c5/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Thu Sep 28 16:08:40 KST 2023 2 | gradle.version=8.2.1 3 | -------------------------------------------------------------------------------- /.gradle/vcs-1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccommit-dev/Board-Server/94c9c585e9bd7230727fab8d0e081fc8da5c73c5/.gradle/vcs-1/gc.properties -------------------------------------------------------------------------------- /HELP.md: -------------------------------------------------------------------------------- 1 | # Read Me First 2 | The following was discovered as part of building this project: 3 | 4 | * The original package name 'com.fastcampus.board-server' is invalid and this project uses 'com.fastcampus.boardserver' instead. 5 | 6 | # Getting Started 7 | 8 | ### Reference Documentation 9 | For further reference, please consider the following sections: 10 | 11 | * [Official Gradle documentation](https://docs.gradle.org) 12 | * [Spring Boot Gradle Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/3.1.4/gradle-plugin/reference/html/) 13 | * [Create an OCI image](https://docs.spring.io/spring-boot/docs/3.1.4/gradle-plugin/reference/html/#build-image) 14 | * [Spring Web](https://docs.spring.io/spring-boot/docs/3.1.4/reference/htmlsingle/index.html#web) 15 | 16 | ### Guides 17 | The following guides illustrate how to use some features concretely: 18 | 19 | * [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/) 20 | * [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/) 21 | * [Building REST services with Spring](https://spring.io/guides/tutorials/rest/) 22 | 23 | ### Additional Links 24 | These additional references should also help you: 25 | 26 | * [Gradle Build Scans – insights for your project's build](https://scans.gradle.com#gradle) 27 | 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Board-Server 2 | [패스트캠퍼스] 대용량 트래픽 게시판 프로젝트 3 | 4 | --- 5 | # 목적 6 | - 대용량 트래픽을 고려한 어플리케이션 개발 (초당 1000 tps 이상의 게시글 검색 API) 7 | - 객체지향과 디자인 패턴을 적용 및 가독성을 고려한 코드 작성 방법 공유 8 | - 현업 단계에서 코드리뷰를 어떻게 하는지 경험 공유 공유 9 | - 모니터링 및 트러블 슈팅 전략 공유 10 | - 젠킨스 툴로 배포 자동화를 통해 개발 생산성 높이기 11 | 12 | --- 13 | # 사용기술 14 | - JAVA 17, Spring Boot 2.3, MyBatis, MySQL, Redis 15 | 16 | --- 17 | # 성능테스트 툴 18 | - Python 3.9, Locust 19 | - ****[성능테스트 툴](https://github.com/ccommit-dev/Board-Server-Locust)**** 20 | 21 | --- 22 | # 기획 23 | - 커뮤니티 사이트의 게시판을 구현함으로써 자유롭게 소통하는 및 정보 공유 사이트를 목표로 구현 24 | - ****https://ovenapp.io/view/Pv1HR7ajNN47W6qWgKHjIro334XPQvBj/**** 25 | 26 | --- 27 | # 프로그램 주요 기능 28 | - 회원 29 | - 가입, 탈퇴 30 | - 아이디 및 닉네임 중복체크 31 | - 비밀번호 암호화 32 | - 로그인, 로그아웃 33 | - 게시판 34 | - 카테고리 관리 35 | - 추가, 삭제, 수정 36 | - 게시글 관리 37 | - 게시글 & 파일 추가, 삭제, 수정, 조회 38 | - 유저 정보, 게시글 제목, 게시글 내용 등 39 | - 게시글 검색 기능 40 | - 작성 유정 아이디 41 | - 게시글 제목, 게시글 내용 등을 통해 검색 42 | - 태크 작성 및 조회 기능 43 | - 댓글 작성 기능 44 | - 어드민 45 | - 공지글 추가 기능 46 | 47 | --- 48 | # 이슈별 실습 내용 49 | ![이슈별 실습 내용 drawio](https://github.com/ccommit-dev/Board-Server/assets/77635521/9434ac9e-3e43-47f7-a2ad-6c560657e199) 50 | 51 | --- 52 | # ERD(Entity Relationship Diagram) 53 | ![image](https://github.com/ccommit-dev/Board-Server/assets/77635521/7fb0ec6b-1317-4911-9315-067244a8dd9e) 54 | 55 | --- 56 | # 시퀀스 57 | - 게시글 등록 시퀀스 58 | ![패캠 게시글 등록 시퀀스](https://github.com/ccommit-dev/Board-Server/assets/77635521/7791db61-97cc-4ad8-a90c-2e0a572049c5) 59 | 60 | - 게시글 검색 시퀀스 61 | ![게시글 검색 시퀀스](https://github.com/ccommit-dev/Board-Server/assets/77635521/c5f228fd-ca8f-4144-a407-30e2647f9159) 62 | 63 | --- 64 | # 아키텍처(요약) 65 | ![게시판 서버 아키텍처 drawio](https://github.com/ccommit-dev/Board-Server/assets/77635521/62e053a4-51a4-4387-90c4-f5e450441f2f) 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java' 3 | id 'org.springframework.boot' version '3.1.4' 4 | id 'io.spring.dependency-management' version '1.1.3' 5 | } 6 | 7 | group = 'com.fastcampus' 8 | version = '0.0.1-SNAPSHOT' 9 | 10 | java { 11 | sourceCompatibility = '17' 12 | } 13 | 14 | configurations { 15 | compileOnly { 16 | extendsFrom annotationProcessor 17 | } 18 | } 19 | 20 | repositories { 21 | mavenCentral() 22 | } 23 | 24 | dependencies { 25 | implementation 'org.springframework.boot:spring-boot-starter-web' 26 | // https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter 27 | implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.1' 28 | // https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-aop 29 | implementation group: 'org.springframework.boot', name: 'spring-boot-starter-aop', version: '3.1.2' 30 | 31 | runtimeOnly("com.mysql:mysql-connector-j") 32 | 33 | // https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api 34 | compileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1' 35 | compileOnly 'org.projectlombok:lombok' 36 | 37 | annotationProcessor 'org.projectlombok:lombok' 38 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 39 | } 40 | 41 | tasks.named('test') { 42 | useJUnitPlatform() 43 | } 44 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccommit-dev/Board-Server/94c9c585e9bd7230727fab8d0e081fc8da5c73c5/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | # This is normally unused 84 | # shellcheck disable=SC2034 85 | APP_BASE_NAME=${0##*/} 86 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 87 | 88 | # Use the maximum available, or set MAX_FD != -1 to use that value. 89 | MAX_FD=maximum 90 | 91 | warn () { 92 | echo "$*" 93 | } >&2 94 | 95 | die () { 96 | echo 97 | echo "$*" 98 | echo 99 | exit 1 100 | } >&2 101 | 102 | # OS specific support (must be 'true' or 'false'). 103 | cygwin=false 104 | msys=false 105 | darwin=false 106 | nonstop=false 107 | case "$( uname )" in #( 108 | CYGWIN* ) cygwin=true ;; #( 109 | Darwin* ) darwin=true ;; #( 110 | MSYS* | MINGW* ) msys=true ;; #( 111 | NONSTOP* ) nonstop=true ;; 112 | esac 113 | 114 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 115 | 116 | 117 | # Determine the Java command to use to start the JVM. 118 | if [ -n "$JAVA_HOME" ] ; then 119 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 120 | # IBM's JDK on AIX uses strange locations for the executables 121 | JAVACMD=$JAVA_HOME/jre/sh/java 122 | else 123 | JAVACMD=$JAVA_HOME/bin/java 124 | fi 125 | if [ ! -x "$JAVACMD" ] ; then 126 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 127 | 128 | Please set the JAVA_HOME variable in your environment to match the 129 | location of your Java installation." 130 | fi 131 | else 132 | JAVACMD=java 133 | if ! command -v java >/dev/null 2>&1 134 | then 135 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 136 | 137 | Please set the JAVA_HOME variable in your environment to match the 138 | location of your Java installation." 139 | fi 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 147 | # shellcheck disable=SC3045 148 | MAX_FD=$( ulimit -H -n ) || 149 | warn "Could not query maximum file descriptor limit" 150 | esac 151 | case $MAX_FD in #( 152 | '' | soft) :;; #( 153 | *) 154 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 155 | # shellcheck disable=SC3045 156 | ulimit -n "$MAX_FD" || 157 | warn "Could not set maximum file descriptor limit to $MAX_FD" 158 | esac 159 | fi 160 | 161 | # Collect all arguments for the java command, stacking in reverse order: 162 | # * args from the command line 163 | # * the main class name 164 | # * -classpath 165 | # * -D...appname settings 166 | # * --module-path (only if needed) 167 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 168 | 169 | # For Cygwin or MSYS, switch paths to Windows format before running java 170 | if "$cygwin" || "$msys" ; then 171 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 172 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 173 | 174 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 175 | 176 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 177 | for arg do 178 | if 179 | case $arg in #( 180 | -*) false ;; # don't mess with options #( 181 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 182 | [ -e "$t" ] ;; #( 183 | *) false ;; 184 | esac 185 | then 186 | arg=$( cygpath --path --ignore --mixed "$arg" ) 187 | fi 188 | # Roll the args list around exactly as many times as the number of 189 | # args, so each arg winds up back in the position where it started, but 190 | # possibly modified. 191 | # 192 | # NB: a `for` loop captures its iteration list before it begins, so 193 | # changing the positional parameters here affects neither the number of 194 | # iterations, nor the values presented in `arg`. 195 | shift # remove old arg 196 | set -- "$@" "$arg" # push replacement arg 197 | done 198 | fi 199 | 200 | 201 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 202 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 203 | 204 | # Collect all arguments for the java command; 205 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 206 | # shell script including quotes and variable substitutions, so put them in 207 | # double quotes to make sure that they get re-expanded; and 208 | # * put everything else in single quotes, so that it's not re-expanded. 209 | 210 | set -- \ 211 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 212 | -classpath "$CLASSPATH" \ 213 | org.gradle.wrapper.GradleWrapperMain \ 214 | "$@" 215 | 216 | # Stop when "xargs" is not available. 217 | if ! command -v xargs >/dev/null 2>&1 218 | then 219 | die "xargs is not available" 220 | fi 221 | 222 | # Use "xargs" to parse quoted args. 223 | # 224 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 225 | # 226 | # In Bash we could simply go: 227 | # 228 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 229 | # set -- "${ARGS[@]}" "$@" 230 | # 231 | # but POSIX shell has neither arrays nor command substitution, so instead we 232 | # post-process each arg (as a line of input to sed) to backslash-escape any 233 | # character that might be a shell metacharacter, then use eval to reverse 234 | # that process (while maintaining the separation between arguments), and wrap 235 | # the whole thing up as a single "set" statement. 236 | # 237 | # This will of course break if any of these variables contains a newline or 238 | # an unmatched quote. 239 | # 240 | 241 | eval "set -- $( 242 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 243 | xargs -n1 | 244 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 245 | tr '\n' ' ' 246 | )" '"$@"' 247 | 248 | exec "$JAVACMD" "$@" 249 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%"=="" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%"=="" set DIRNAME=. 29 | @rem This is normally unused 30 | set APP_BASE_NAME=%~n0 31 | set APP_HOME=%DIRNAME% 32 | 33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 35 | 36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 38 | 39 | @rem Find java.exe 40 | if defined JAVA_HOME goto findJavaFromJavaHome 41 | 42 | set JAVA_EXE=java.exe 43 | %JAVA_EXE% -version >NUL 2>&1 44 | if %ERRORLEVEL% equ 0 goto execute 45 | 46 | echo. 47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 48 | echo. 49 | echo Please set the JAVA_HOME variable in your environment to match the 50 | echo location of your Java installation. 51 | 52 | goto fail 53 | 54 | :findJavaFromJavaHome 55 | set JAVA_HOME=%JAVA_HOME:"=% 56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 57 | 58 | if exist "%JAVA_EXE%" goto execute 59 | 60 | echo. 61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 62 | echo. 63 | echo Please set the JAVA_HOME variable in your environment to match the 64 | echo location of your Java installation. 65 | 66 | goto fail 67 | 68 | :execute 69 | @rem Setup the command line 70 | 71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 72 | 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if %ERRORLEVEL% equ 0 goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | set EXIT_CODE=%ERRORLEVEL% 85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 87 | exit /b %EXIT_CODE% 88 | 89 | :mainEnd 90 | if "%OS%"=="Windows_NT" endlocal 91 | 92 | :omega 93 | -------------------------------------------------------------------------------- /out/production/resources/application.properties: -------------------------------------------------------------------------------- 1 | # mysql 2 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 3 | spring.datasource.jdbc-url=jdbc:mysql://localhost:3306/board 4 | spring.datasource.username=root 5 | spring.datasource.password=1234 6 | mybatis.mapper-locations=classpath:com.fastcampus.boardserver.mapper/*.xml -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'board-server' 2 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/BoardServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class BoardServerApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(BoardServerApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/aop/LoginCheck.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.aop; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target(ElementType.METHOD) 10 | public @interface LoginCheck { 11 | public static enum UserType { 12 | USER, ADMIN 13 | } 14 | UserType type(); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/aop/LoginCheckAspect.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.aop; 2 | 3 | import com.fastcampus.boardserver.utils.SessionUtil; 4 | import jakarta.servlet.http.HttpSession; 5 | import lombok.extern.log4j.Log4j2; 6 | import org.aspectj.lang.ProceedingJoinPoint; 7 | import org.aspectj.lang.annotation.Around; 8 | import org.aspectj.lang.annotation.Aspect; 9 | import org.springframework.core.Ordered; 10 | import org.springframework.core.annotation.Order; 11 | import org.springframework.http.HttpStatus; 12 | import org.springframework.stereotype.Component; 13 | import org.springframework.web.client.HttpStatusCodeException; 14 | import org.springframework.web.context.request.RequestContextHolder; 15 | import org.springframework.web.context.request.ServletRequestAttributes; 16 | 17 | 18 | 19 | @Component 20 | @Aspect 21 | @Order(Ordered.LOWEST_PRECEDENCE) 22 | @Log4j2 23 | public class LoginCheckAspect { 24 | @Around("@annotation(com.fastcampus.boardserver.aop.LoginCheck) && @ annotation(loginCheck)") 25 | public Object adminLoginCheck(ProceedingJoinPoint proceedingJoinPoint, LoginCheck loginCheck) throws Throwable { 26 | HttpSession session = (HttpSession) ((ServletRequestAttributes) (RequestContextHolder.currentRequestAttributes())).getRequest().getSession(); 27 | String id = null; 28 | int idIndex = 0; 29 | 30 | 31 | String userType = loginCheck.type().toString(); 32 | switch (userType) { 33 | case "ADMIN": { 34 | id = SessionUtil.getLoginAdminId(session); 35 | break; 36 | } 37 | case "USER": { 38 | id = SessionUtil.getLoginMemberId(session); 39 | break; 40 | } 41 | } 42 | if (id == null) { 43 | log.debug(proceedingJoinPoint.toString()+ "accountName :" + id); 44 | throw new HttpStatusCodeException(HttpStatus.UNAUTHORIZED, "로그인한 id값을 확인해주세요.") {}; 45 | } 46 | 47 | Object[] modifiedArgs = proceedingJoinPoint.getArgs(); 48 | 49 | if(proceedingJoinPoint.getArgs()!=null) 50 | modifiedArgs[idIndex] = id; 51 | 52 | return proceedingJoinPoint.proceed(modifiedArgs); 53 | } 54 | 55 | } -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/config/DatabaseConfig.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.config; 2 | 3 | import org.springframework.boot.context.properties.ConfigurationProperties; 4 | import org.springframework.boot.jdbc.DataSourceBuilder; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | import javax.sql.DataSource; 9 | 10 | @Configuration 11 | public class DatabaseConfig { 12 | 13 | @ConfigurationProperties(prefix = "spring.datasource") 14 | @Bean 15 | public DataSource dataSource(){ 16 | return DataSourceBuilder.create().build(); 17 | } 18 | 19 | 20 | } 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/config/MySQLConfig.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.config; 2 | 3 | import org.apache.ibatis.session.SqlSessionFactory; 4 | import org.mybatis.spring.SqlSessionFactoryBean; 5 | import org.mybatis.spring.annotation.MapperScan; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | import org.springframework.core.io.Resource; 9 | import org.springframework.core.io.support.PathMatchingResourcePatternResolver; 10 | 11 | import javax.sql.DataSource; 12 | 13 | @Configuration 14 | @MapperScan(basePackages = "com.fastcampus.boardserver") 15 | public class MySQLConfig { 16 | 17 | @Bean 18 | public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception { 19 | final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); 20 | sessionFactory.setDataSource(dataSource); 21 | 22 | PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); 23 | sessionFactory.setMapperLocations(resolver.getResources("classpath:mappers/*.xml")); 24 | 25 | Resource myBatisConfig = new PathMatchingResourcePatternResolver().getResource("classpath:mybatis-config.xml"); 26 | sessionFactory.setConfigLocation(myBatisConfig); 27 | 28 | return sessionFactory.getObject(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/controller/CategoryController.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.controller; 2 | 3 | import com.fastcampus.boardserver.aop.LoginCheck; 4 | import com.fastcampus.boardserver.dto.CategoryDTO; 5 | import com.fastcampus.boardserver.service.impl.CategoryServiceImpl; 6 | import lombok.Getter; 7 | import lombok.Setter; 8 | import lombok.extern.log4j.Log4j2; 9 | import org.springframework.http.HttpStatus; 10 | import org.springframework.web.bind.annotation.*; 11 | 12 | @RestController 13 | @RequestMapping("/categories") 14 | @Log4j2 15 | public class CategoryController { 16 | 17 | private CategoryServiceImpl categoryService; 18 | 19 | public CategoryController(CategoryServiceImpl categoryService) { 20 | this.categoryService = categoryService; 21 | } 22 | 23 | @PostMapping 24 | @ResponseStatus(HttpStatus.CREATED) 25 | @LoginCheck(type = LoginCheck.UserType.ADMIN) 26 | public void registerCategory(String accountId, @RequestBody CategoryDTO categoryDTO) { 27 | categoryService.register(accountId, categoryDTO); 28 | } 29 | 30 | @PatchMapping("{categoryId}") 31 | @LoginCheck(type = LoginCheck.UserType.ADMIN) 32 | public void updateCategories(String accountId, 33 | @PathVariable(name = "categoryId") int categoryId, 34 | @RequestBody CategoryRequest categoryRequest) { 35 | CategoryDTO categoryDTO = new CategoryDTO(categoryId, categoryRequest.getName(), CategoryDTO.SortStatus.NEWEST,10,1); 36 | categoryService.update(categoryDTO); 37 | } 38 | 39 | @DeleteMapping("{categoryId}") 40 | @LoginCheck(type = LoginCheck.UserType.ADMIN) 41 | public void updateCategories(String accountId, 42 | @PathVariable(name = "categoryId") int categoryId) { 43 | categoryService.delete(categoryId); 44 | } 45 | 46 | // -------------- request 객체 -------------- 47 | 48 | @Setter 49 | @Getter 50 | private static class CategoryRequest { 51 | private int id; 52 | private String name; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/controller/PostController.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.controller; 2 | 3 | import com.fastcampus.boardserver.aop.LoginCheck; 4 | import com.fastcampus.boardserver.dto.PostDTO; 5 | import com.fastcampus.boardserver.dto.UserDTO; 6 | import com.fastcampus.boardserver.dto.response.CommonResponse; 7 | import com.fastcampus.boardserver.service.impl.PostServiceImpl; 8 | import com.fastcampus.boardserver.service.impl.UserServiceImpl; 9 | import lombok.AllArgsConstructor; 10 | import lombok.Getter; 11 | import lombok.Setter; 12 | import lombok.extern.log4j.Log4j2; 13 | import org.springframework.http.HttpStatus; 14 | import org.springframework.http.ResponseEntity; 15 | import org.springframework.web.bind.annotation.*; 16 | 17 | import java.util.Date; 18 | import java.util.List; 19 | 20 | @RestController 21 | @RequestMapping("/posts") 22 | @Log4j2 23 | public class PostController { 24 | 25 | private final PostServiceImpl postService; 26 | private final UserServiceImpl userService; 27 | 28 | public PostController(PostServiceImpl postService, UserServiceImpl userService) { 29 | this.postService = postService; 30 | this.userService = userService; 31 | } 32 | 33 | @PostMapping 34 | @ResponseStatus(HttpStatus.CREATED) 35 | @LoginCheck(type = LoginCheck.UserType.USER) 36 | public ResponseEntity> registerPost(String accountId, @RequestBody PostDTO postDTO) { 37 | postService.register(accountId, postDTO); 38 | CommonResponse commonResponse = new CommonResponse<>(HttpStatus.OK, "SUCCESS", "registerPost", postDTO); 39 | return ResponseEntity.ok(commonResponse); 40 | } 41 | 42 | @GetMapping("my-posts") 43 | @LoginCheck(type = LoginCheck.UserType.USER) 44 | public ResponseEntity>> myPostInfo(String accountId) { 45 | UserDTO memberInfo = userService.getUserInfo(accountId); 46 | List postDTOList = postService.getMyProducts(memberInfo.getId()); 47 | CommonResponse commonResponse = new CommonResponse<>(HttpStatus.OK, "SUCCESS", "myPostInfo", postDTOList); 48 | return ResponseEntity.ok(commonResponse); 49 | } 50 | 51 | @PatchMapping("{postId}") 52 | @LoginCheck(type = LoginCheck.UserType.USER) 53 | public ResponseEntity> updatePosts(String accountId, 54 | @PathVariable(name = "postId") int postId, 55 | @RequestBody PostRequest postRequest) { 56 | UserDTO memberInfo = userService.getUserInfo(accountId); 57 | PostDTO postDTO = PostDTO.builder() 58 | .id(postId) 59 | .name(postRequest.getName()) 60 | .contents(postRequest.getContents()) 61 | .views(postRequest.getViews()) 62 | .categoryId(postRequest.getCategoryId()) 63 | .userId(memberInfo.getId()) 64 | .fileId(postRequest.getFileId()) 65 | .updateTime(new Date()) 66 | .build(); 67 | postService.updateProducts(postDTO); 68 | CommonResponse commonResponse = new CommonResponse<>(HttpStatus.OK, "SUCCESS", "updatePosts", postDTO); 69 | return ResponseEntity.ok(commonResponse); 70 | } 71 | 72 | @DeleteMapping("{postId}") 73 | @LoginCheck(type = LoginCheck.UserType.USER) 74 | public ResponseEntity> deleteposts(String accountId, 75 | @PathVariable(name = "postId") int postId, 76 | @RequestBody PostDeleteRequest postDeleteRequest) { 77 | UserDTO memberInfo = userService.getUserInfo(accountId); 78 | postService.deleteProduct(memberInfo.getId(), postId); 79 | CommonResponse commonResponse = new CommonResponse<>(HttpStatus.OK, "SUCCESS", "deleteposts", postDeleteRequest); 80 | return ResponseEntity.ok(commonResponse); 81 | } 82 | 83 | // -------------- response 객체 -------------- 84 | 85 | @Getter 86 | @AllArgsConstructor 87 | private static class PostResponse { 88 | private List postDTO; 89 | } 90 | 91 | // -------------- request 객체 -------------- 92 | 93 | @Setter 94 | @Getter 95 | private static class PostRequest { 96 | private String name; 97 | private String contents; 98 | private int views; 99 | private int categoryId; 100 | private int userId; 101 | private int fileId; 102 | private Date updateTime; 103 | } 104 | 105 | @Setter 106 | @Getter 107 | private static class PostDeleteRequest { 108 | private int id; 109 | private int accountId; 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.controller; 2 | 3 | import com.fastcampus.boardserver.aop.LoginCheck; 4 | import com.fastcampus.boardserver.dto.UserDTO; 5 | import com.fastcampus.boardserver.dto.request.UserDeleteId; 6 | import com.fastcampus.boardserver.dto.request.UserLoginRequest; 7 | import com.fastcampus.boardserver.dto.request.UserUpdatePasswordRequest; 8 | import com.fastcampus.boardserver.dto.response.LoginResponse; 9 | import com.fastcampus.boardserver.dto.response.UserInfoResponse; 10 | import com.fastcampus.boardserver.service.impl.UserServiceImpl; 11 | import com.fastcampus.boardserver.utils.SessionUtil; 12 | import jakarta.servlet.http.HttpSession; 13 | import lombok.extern.log4j.Log4j2; 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | import org.springframework.http.HttpStatus; 16 | import org.springframework.http.ResponseEntity; 17 | import org.springframework.web.bind.annotation.*; 18 | 19 | 20 | @RestController 21 | @RequestMapping("/users") 22 | @Log4j2 23 | public class UserController { 24 | 25 | private final UserServiceImpl userService; 26 | private static final ResponseEntity FAIL_RESPONSE = new ResponseEntity(HttpStatus.BAD_REQUEST); 27 | 28 | @Autowired 29 | public UserController(UserServiceImpl userService) { 30 | this.userService = userService; 31 | } 32 | 33 | 34 | @PostMapping("sign-up") 35 | @ResponseStatus(HttpStatus.CREATED) 36 | public void signUp(@RequestBody UserDTO userDTO) { 37 | if (UserDTO.hasNullDataBeforeSignup(userDTO)) { 38 | throw new NullPointerException("회원가입시 필수 데이터를 모두 입력해야 합니다."); 39 | } 40 | userService.register(userDTO); 41 | } 42 | 43 | @PostMapping("sign-in") 44 | public HttpStatus login(@RequestBody UserLoginRequest loginRequest, 45 | HttpSession session) { 46 | ResponseEntity responseEntity = null; 47 | String userId = loginRequest.getUserId(); 48 | String password = loginRequest.getPassword(); 49 | UserDTO userInfo = userService.login(userId, password); 50 | String id = userInfo.getId().toString(); 51 | 52 | if (userInfo == null) { 53 | return HttpStatus.NOT_FOUND; 54 | } else if (userInfo != null) { 55 | LoginResponse loginResponse = LoginResponse.success(userInfo); 56 | if (userInfo.getStatus() == (UserDTO.Status.ADMIN)) 57 | SessionUtil.setLoginAdminId(session, id); 58 | else 59 | SessionUtil.setLoginMemberId(session, id); 60 | 61 | responseEntity = new ResponseEntity(loginResponse, HttpStatus.OK); 62 | } else { 63 | throw new RuntimeException("Login Error! 유저 정보가 없거나 지워진 유저 정보입니다."); 64 | } 65 | 66 | return HttpStatus.OK; 67 | } 68 | 69 | @GetMapping("my-info") 70 | public UserInfoResponse memberInfo(HttpSession session) { 71 | String id = SessionUtil.getLoginMemberId(session); 72 | if (id == null) id = SessionUtil.getLoginAdminId(session); 73 | UserDTO memberInfo = userService.getUserInfo(id); 74 | return new UserInfoResponse(memberInfo); 75 | } 76 | 77 | @PutMapping("logout") 78 | public void logout(String accountId, HttpSession session) { 79 | SessionUtil.clear(session); 80 | } 81 | 82 | @PatchMapping("password") 83 | @LoginCheck(type = LoginCheck.UserType.USER) 84 | public ResponseEntity updateUserPassword(String accountId, @RequestBody UserUpdatePasswordRequest userUpdatePasswordRequest, 85 | HttpSession session) { 86 | ResponseEntity responseEntity = null; 87 | String Id = accountId; 88 | String beforePassword = userUpdatePasswordRequest.getBeforePassword(); 89 | String afterPassword = userUpdatePasswordRequest.getAfterPassword(); 90 | 91 | try { 92 | userService.updatePassword(Id, beforePassword, afterPassword); 93 | UserDTO userInfo = userService.login(Id, afterPassword); 94 | LoginResponse loginResponse = LoginResponse.success(userInfo); 95 | ResponseEntity.ok(new ResponseEntity(loginResponse, HttpStatus.OK)); 96 | } catch (IllegalArgumentException e) { 97 | log.error("updatePassword 실패", e); 98 | responseEntity = FAIL_RESPONSE; 99 | } 100 | return responseEntity; 101 | } 102 | 103 | @DeleteMapping 104 | public ResponseEntity deleteId(@RequestBody UserDeleteId userDeleteId, 105 | HttpSession session) { 106 | ResponseEntity responseEntity = null; 107 | String Id = SessionUtil.getLoginMemberId(session); 108 | 109 | try { 110 | UserDTO userInfo = userService.login(Id, userDeleteId.getPassword()); 111 | userService.deleteId(Id, userDeleteId.getPassword()); 112 | LoginResponse loginResponse = LoginResponse.success(userInfo); 113 | responseEntity = new ResponseEntity(loginResponse, HttpStatus.OK); 114 | } catch (RuntimeException e) { 115 | log.info("deleteID 실패"); 116 | responseEntity = FAIL_RESPONSE; 117 | } 118 | return responseEntity; 119 | } 120 | } -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/dto/CategoryDTO.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.dto; 2 | 3 | import lombok.*; 4 | 5 | @Getter 6 | @Setter 7 | @ToString 8 | @AllArgsConstructor 9 | @NoArgsConstructor 10 | public class CategoryDTO { 11 | public enum SortStatus { 12 | CATEGORIES, NEWEST, OLDEST, HIGHPRICE, LOWPRICE, GRADE 13 | } 14 | private int id; 15 | private String name; 16 | private SortStatus sortStatus; 17 | private int searchCount; 18 | private int pagingStartOffset; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/dto/PostDTO.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.dto; 2 | 3 | import lombok.*; 4 | 5 | import java.util.Date; 6 | 7 | @Builder 8 | @Getter 9 | @Setter 10 | @ToString 11 | @AllArgsConstructor 12 | @NoArgsConstructor 13 | public class PostDTO { 14 | private int id; 15 | private String name; 16 | private int isAdmin; 17 | private String contents; 18 | private Date createTime; 19 | private int views; 20 | private int categoryId; 21 | private int userId; 22 | private int fileId; 23 | private Date updateTime; 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/dto/UserDTO.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.dto; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import lombok.ToString; 6 | 7 | import java.util.Date; 8 | 9 | @Getter 10 | @Setter 11 | @ToString 12 | public class UserDTO { 13 | public enum Status { 14 | DEFAULT, ADMIN, DELETED 15 | } 16 | private Integer id; 17 | private String userId; 18 | private String password; 19 | private String nickName; 20 | private boolean isAdmin; 21 | private Date createTime; 22 | private boolean isWithDraw; 23 | private Status status; 24 | private Date updateTime; 25 | 26 | public UserDTO(){ 27 | } 28 | 29 | public UserDTO(String id, String password, String name, String phone, String address, Status status, Date createTime, Date updateTime, boolean isAdmin) { 30 | this.userId = id; 31 | this.password = password; 32 | this.nickName = name; 33 | this.status = status; 34 | this.createTime = createTime; 35 | this.updateTime = updateTime; 36 | this.isAdmin = isAdmin; 37 | } 38 | 39 | public static boolean hasNullDataBeforeSignup(UserDTO userDTO) { 40 | return userDTO.getUserId() == null || userDTO.getPassword() == null 41 | || userDTO.getNickName() == null; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/dto/request/UserDeleteId.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.dto.request; 2 | 3 | import lombok.Getter; 4 | import lombok.NonNull; 5 | import lombok.Setter; 6 | 7 | @Setter 8 | @Getter 9 | public class UserDeleteId { 10 | @NonNull 11 | private String id; 12 | @NonNull 13 | private String password; 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/dto/request/UserLoginRequest.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.dto.request; 2 | 3 | import lombok.Getter; 4 | import lombok.NonNull; 5 | import lombok.Setter; 6 | 7 | @Setter 8 | @Getter 9 | public class UserLoginRequest { 10 | @NonNull 11 | private String userId; 12 | @NonNull 13 | private String password; 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/dto/request/UserUpdatePasswordRequest.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.dto.request; 2 | 3 | import lombok.Getter; 4 | import lombok.NonNull; 5 | import lombok.Setter; 6 | 7 | @Setter 8 | @Getter 9 | public class UserUpdatePasswordRequest { 10 | @NonNull 11 | private String beforePassword; 12 | @NonNull 13 | private String afterPassword; 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/dto/response/CommonResponse.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.dto.response; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | import lombok.NoArgsConstructor; 6 | import org.springframework.http.HttpStatus; 7 | 8 | @Getter 9 | @NoArgsConstructor 10 | @AllArgsConstructor 11 | public class CommonResponse { 12 | 13 | private HttpStatus status; 14 | private String code; 15 | private String message; 16 | private T requestBody; 17 | 18 | } -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/dto/response/LoginResponse.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.dto.response; 2 | 3 | import com.fastcampus.boardserver.controller.UserController; 4 | import com.fastcampus.boardserver.dto.UserDTO; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Getter; 7 | import lombok.NonNull; 8 | import lombok.RequiredArgsConstructor; 9 | 10 | @Getter 11 | @AllArgsConstructor 12 | @RequiredArgsConstructor 13 | public class LoginResponse { 14 | enum LoginStatus { 15 | SUCCESS, FAIL, DELETED 16 | } 17 | 18 | @NonNull 19 | private LoginStatus result; 20 | private UserDTO userDTO; 21 | 22 | private static final LoginResponse FAIL = new LoginResponse(LoginStatus.FAIL); 23 | 24 | public static LoginResponse success(UserDTO userDTO) { 25 | return new LoginResponse(LoginStatus.SUCCESS, userDTO); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/dto/response/UserInfoResponse.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.dto.response; 2 | 3 | import com.fastcampus.boardserver.dto.UserDTO; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Getter; 6 | 7 | @Getter 8 | @AllArgsConstructor 9 | public class UserInfoResponse { 10 | private UserDTO userDTO; 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/exception/DuplicateIdException.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.exception; 2 | 3 | public class DuplicateIdException extends RuntimeException { 4 | 5 | public DuplicateIdException(String msg) { 6 | super(msg); 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/mapper/CategoryMapper.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.mapper; 2 | 3 | import com.fastcampus.boardserver.dto.CategoryDTO; 4 | 5 | public interface CategoryMapper { 6 | public int register(CategoryDTO productDTO); 7 | 8 | public void updateCategory(CategoryDTO categoryDTO); 9 | 10 | public void deleteCategory(int categoryId); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/mapper/PostMapper.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.mapper; 2 | 3 | import com.fastcampus.boardserver.dto.PostDTO; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | 8 | @Mapper 9 | public interface PostMapper { 10 | public int register(PostDTO postDTO); 11 | 12 | public List selectMyProducts(int accountId); 13 | 14 | public void updateProducts(PostDTO postDTO); 15 | 16 | public void deleteProduct(int productId); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/mapper/UserProfileMapper.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.mapper; 2 | 3 | 4 | import com.fastcampus.boardserver.dto.UserDTO; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | @Mapper 9 | public interface UserProfileMapper { 10 | public UserDTO getUserProfile(@Param("id") String id); 11 | 12 | int insertUserProfile(@Param("id") String id, @Param("password") String password, @Param("name") String name, @Param("phone") String phone, @Param("address") String address); 13 | 14 | int updateUserProfile(@Param("id") String id, @Param("password") String password, @Param("name") String name, @Param("phone") String phone, @Param("address") String address); 15 | 16 | int deleteUserProfile(@Param("id") String id); 17 | 18 | public int register(UserDTO userDTO); 19 | 20 | public UserDTO findByIdAndPassword(@Param("id") String id, 21 | @Param("password") String password); 22 | 23 | public UserDTO findByUserIdAndPassword(@Param("userId") String userId, 24 | @Param("password") String password); 25 | 26 | int idCheck(String id); 27 | 28 | public int updatePassword(UserDTO userDTO); 29 | 30 | public int updateAddress(UserDTO userDTO); 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/service/CategoryService.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.service; 2 | 3 | 4 | import com.fastcampus.boardserver.dto.CategoryDTO; 5 | 6 | public interface CategoryService { 7 | 8 | void register(String accountId, CategoryDTO categoryDTO); 9 | 10 | void update(CategoryDTO categoryDTO); 11 | 12 | void delete(int categoryId); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/service/PostService.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.service; 2 | 3 | 4 | import com.fastcampus.boardserver.dto.PostDTO; 5 | 6 | import java.util.List; 7 | 8 | public interface PostService { 9 | 10 | void register(String id, PostDTO postDTO); 11 | 12 | List getMyProducts(int accountId); 13 | 14 | void updateProducts(PostDTO postDTO); 15 | 16 | void deleteProduct(int userId, int productId); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.service; 2 | 3 | 4 | import com.fastcampus.boardserver.dto.UserDTO; 5 | 6 | public interface UserService { 7 | 8 | void register(UserDTO userProfile); 9 | 10 | UserDTO login(String id, String password); 11 | 12 | boolean isDuplicatedId(String id); 13 | 14 | UserDTO getUserInfo(String userId); 15 | 16 | void updatePassword(String id, String beforePassword, String afterPassword); 17 | 18 | void deleteId(String id, String passWord); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/service/impl/CategoryServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.service.impl; 2 | 3 | 4 | import com.fastcampus.boardserver.dto.CategoryDTO; 5 | import com.fastcampus.boardserver.mapper.CategoryMapper; 6 | import com.fastcampus.boardserver.service.CategoryService; 7 | import lombok.extern.log4j.Log4j2; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | @Service 12 | @Log4j2 13 | public class CategoryServiceImpl implements CategoryService { 14 | 15 | @Autowired 16 | private CategoryMapper categoryMapper; 17 | 18 | @Override 19 | public void register(String accountId, CategoryDTO categoryDTO) { 20 | if (accountId != null) { 21 | categoryMapper.register(categoryDTO); 22 | } else { 23 | log.error("register ERROR! {}", categoryDTO); 24 | throw new RuntimeException("register ERROR! 상품 카테고리 등록 메서드를 확인해주세요\n" + "Params : " + categoryDTO); 25 | } 26 | 27 | } 28 | 29 | @Override 30 | public void update(CategoryDTO categoryDTO) { 31 | if (categoryDTO != null) { 32 | categoryMapper.updateCategory(categoryDTO); 33 | } else { 34 | log.error("update ERROR! {}", categoryDTO); 35 | throw new RuntimeException("update ERROR! 물품 카테고리 변경 메서드를 확인해주세요\n" + "Params : " + categoryDTO); 36 | } 37 | } 38 | 39 | @Override 40 | public void delete(int categoryId) { 41 | if (categoryId != 0) { 42 | categoryMapper.deleteCategory(categoryId); 43 | } else { 44 | log.error("deleteCategory ERROR! {}", categoryId); 45 | throw new RuntimeException("deleteCategory ERROR! 물품 카테고리 삭제 메서드를 확인해주세요\n" + "Params : " + categoryId); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/service/impl/PostServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.service.impl; 2 | 3 | import com.fastcampus.boardserver.dto.PostDTO; 4 | import com.fastcampus.boardserver.dto.UserDTO; 5 | import com.fastcampus.boardserver.mapper.PostMapper; 6 | import com.fastcampus.boardserver.mapper.UserProfileMapper; 7 | import com.fastcampus.boardserver.service.PostService; 8 | import lombok.extern.log4j.Log4j2; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.cache.annotation.CacheEvict; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | @Service 17 | @Log4j2 18 | public class PostServiceImpl implements PostService { 19 | 20 | @Autowired 21 | private PostMapper postMapper; 22 | 23 | @Autowired 24 | private UserProfileMapper userProfileMapper; 25 | 26 | @CacheEvict(value="getProducts", allEntries = true) 27 | @Override 28 | public void register(String id, PostDTO postDTO) { 29 | UserDTO memberInfo = userProfileMapper.getUserProfile(id); 30 | postDTO.setUserId(memberInfo.getId()); 31 | postDTO.setCreateTime(new Date()); 32 | 33 | if (memberInfo != null) { 34 | postMapper.register(postDTO); 35 | } else { 36 | log.error("register ERROR! {}", postDTO); 37 | throw new RuntimeException("register ERROR! 상품 등록 메서드를 확인해주세요\n" + "Params : " + postDTO); 38 | } 39 | } 40 | 41 | @Override 42 | public List getMyProducts(int accountId) { 43 | List postDTOList = postMapper.selectMyProducts(accountId); 44 | return postDTOList; 45 | } 46 | 47 | @Override 48 | public void updateProducts(PostDTO postDTO) { 49 | if (postDTO != null && postDTO.getId() != 0 && postDTO.getUserId() != 0) { 50 | postMapper.updateProducts(postDTO); 51 | } else { 52 | log.error("updateProducts ERROR! {}", postDTO); 53 | throw new RuntimeException("updateProducts ERROR! 물품 변경 메서드를 확인해주세요\n" + "Params : " + postDTO); 54 | } 55 | } 56 | 57 | @Override 58 | public void deleteProduct(int userId, int productId) { 59 | if (userId != 0 && productId != 0) { 60 | postMapper.deleteProduct(productId); 61 | } else { 62 | log.error("deleteProudct ERROR! {}", productId); 63 | throw new RuntimeException("updateProducts ERROR! 물품 삭제 메서드를 확인해주세요\n" + "Params : " + productId); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.service.impl; 2 | import com.fastcampus.boardserver.dto.UserDTO; 3 | import com.fastcampus.boardserver.exception.DuplicateIdException; 4 | import com.fastcampus.boardserver.mapper.UserProfileMapper; 5 | import com.fastcampus.boardserver.service.UserService; 6 | import com.fastcampus.boardserver.utils.SHA256Util; 7 | import lombok.extern.log4j.Log4j2; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.Date; 12 | 13 | @Service 14 | @Log4j2 15 | public class UserServiceImpl implements UserService { 16 | 17 | @Autowired 18 | private UserProfileMapper userProfileMapper; 19 | 20 | public UserServiceImpl(UserProfileMapper userProfileMapper) { 21 | this.userProfileMapper = userProfileMapper; 22 | } 23 | 24 | @Override 25 | public UserDTO getUserInfo(String userId) { 26 | return userProfileMapper.getUserProfile(userId); 27 | } 28 | 29 | @Override 30 | public void register(UserDTO userDTO) { 31 | boolean duplIdResult = isDuplicatedId(userDTO.getUserId()); 32 | if (duplIdResult) { 33 | throw new DuplicateIdException("중복된 아이디입니다."); 34 | } 35 | userDTO.setCreateTime(new Date()); 36 | userDTO.setPassword(SHA256Util.encryptSHA256(userDTO.getPassword())); 37 | int insertCount = userProfileMapper.register(userDTO); 38 | 39 | if (insertCount != 1) { 40 | log.error("insertMember ERROR! {}", userDTO); 41 | throw new RuntimeException( 42 | "insertUser ERROR! 회원가입 메서드를 확인해주세요\n" + "Params : " + userDTO); 43 | } 44 | } 45 | @Override 46 | public UserDTO login(String id, String password) { 47 | String cryptoPassword = SHA256Util.encryptSHA256(password); 48 | UserDTO memberInfo = userProfileMapper.findByUserIdAndPassword(id, cryptoPassword); 49 | return memberInfo; 50 | } 51 | 52 | @Override 53 | public boolean isDuplicatedId(String id) { 54 | return userProfileMapper.idCheck(id) == 1; 55 | } 56 | 57 | @Override 58 | public void updatePassword(String id, String beforePassword, String afterPassword) { 59 | String cryptoPassword = SHA256Util.encryptSHA256(beforePassword); 60 | UserDTO memberInfo = userProfileMapper.findByIdAndPassword(id, cryptoPassword); 61 | 62 | if (memberInfo != null) { 63 | memberInfo.setPassword(SHA256Util.encryptSHA256(afterPassword)); 64 | int insertCount = userProfileMapper.updatePassword(memberInfo); 65 | } else { 66 | log.error("updatePasswrod ERROR! {}", memberInfo); 67 | throw new IllegalArgumentException("updatePasswrod ERROR! 비밀번호 변경 메서드를 확인해주세요\n" + "Params : " + memberInfo); 68 | } 69 | } 70 | 71 | @Override 72 | public void deleteId(String id, String passWord) { 73 | String cryptoPassword = SHA256Util.encryptSHA256(passWord); 74 | UserDTO memberInfo = userProfileMapper.findByIdAndPassword(id, cryptoPassword); 75 | 76 | if (memberInfo != null) { 77 | userProfileMapper.deleteUserProfile(memberInfo.getUserId()); 78 | } else { 79 | log.error("deleteId ERROR! {}", memberInfo); 80 | throw new RuntimeException("deleteId ERROR! id 삭제 메서드를 확인해주세요\n" + "Params : " + memberInfo); 81 | } 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/utils/SHA256Util.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.utils; 2 | 3 | import lombok.extern.log4j.Log4j2; 4 | 5 | import java.security.MessageDigest; 6 | import java.security.NoSuchAlgorithmException; 7 | @Log4j2 8 | public class SHA256Util { 9 | public static final String ENCRYPTION_TYPE = "SHA-256"; 10 | public static String encryptSHA256(String str) { 11 | String SHA = null; 12 | 13 | MessageDigest sh; 14 | try { 15 | sh = MessageDigest.getInstance(ENCRYPTION_TYPE); 16 | sh.update(str.getBytes()); 17 | byte[] byteData = sh.digest(); 18 | StringBuilder sb = new StringBuilder(); 19 | for (int i = 0; i < byteData.length; i++) { 20 | sb.append(Integer.toString((byteData[i] & 0xff) + 0x100, 16).substring(1)); 21 | } 22 | SHA = sb.toString(); 23 | } catch (NoSuchAlgorithmException e) { 24 | throw new RuntimeException("암호화 에러!", e); 25 | } 26 | return SHA; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/fastcampus/boardserver/utils/SessionUtil.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver.utils; 2 | 3 | 4 | import jakarta.servlet.http.HttpSession; 5 | 6 | public class SessionUtil { 7 | private static final String LOGIN_MEMBER_ID = "LOGIN_MEMBER_ID"; 8 | private static final String LOGIN_ADMIN_ID = "LOGIN_ADMIN_ID"; 9 | private SessionUtil() { 10 | } 11 | public static String getLoginMemberId(HttpSession session) { 12 | return (String) session.getAttribute(LOGIN_MEMBER_ID); 13 | } 14 | public static void setLoginMemberId(HttpSession session, String id) { 15 | session.setAttribute(LOGIN_MEMBER_ID, id); 16 | } 17 | public static String getLoginAdminId(HttpSession session) { 18 | return (String) session.getAttribute(LOGIN_ADMIN_ID); 19 | } 20 | public static void setLoginAdminId(HttpSession session, String id) { 21 | session.setAttribute(LOGIN_ADMIN_ID, id); 22 | } 23 | public static void clear(HttpSession session) { 24 | session.invalidate(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # mysql 2 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 3 | spring.datasource.jdbc-url=jdbc:mysql://localhost:3306/board 4 | spring.datasource.username=root 5 | spring.datasource.password=1234 6 | mybatis.mapper-locations=classpath:com.fastcampus.boardserver.mapper/*.xml -------------------------------------------------------------------------------- /src/main/resources/mappers/categoryMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | INSERT INTO category (id, name) 10 | VALUES (#{id}, #{name}) 11 | 12 | 13 | 14 | UPDATE category 15 | SET name = #{name} 16 | WHERE id = #{id} 17 | 18 | 19 | 20 | DELETE FROM category 21 | WHERE id = #{id} 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/main/resources/mappers/postMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | INSERT INTO post (name, isAdmin, contents, createTime, views, categoryId, userId, fileId, updateTime ) 10 | VALUES (#{name}, #{isAdmin}, #{contents}, #{createTime}, #{views}, #{categoryId}, #{userId}, #{fileId}, #{updateTime}) 11 | 12 | 13 | 27 | 28 | 29 | UPDATE post 30 | SET name = #{name}, 31 | contents = #{contents}, 32 | views = #{views}, 33 | categoryId = #{categoryId}, 34 | userId = #{userId}, 35 | fileId = #{fileId}, 36 | updateTime = #{updateTime} 37 | WHERE id = #{id} 38 | 39 | 40 | 41 | DELETE FROM post 42 | WHERE id = #{productId} 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/mappers/userMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | INSERT INTO user (userId, passWord, nickName, isWithDraw, status, isAdmin) 16 | VALUES (#{userId}, #{password}, #{nickName}, #{isWithDraw}, #{status}, #{isAdmin}) 17 | 18 | 19 | 20 | UPDATE user 21 | SET password=#{password}, 22 | nickName=#{nickName}, 23 | isWithDraw=#{isWithDraw}, 24 | status=#{status} 25 | WHERE id = #{id} 26 | 27 | 28 | 29 | DELETE 30 | FROM user 31 | WHERE userId = #{id} 32 | 33 | 34 | 35 | INSERT INTO user (userId, passWord, nickName, createTime, isWithDraw, status) 36 | VALUES (#{userId}, #{password}, #{nickName}, #{createTime}, #{isWithDraw}, #{status}) 37 | 38 | 39 | 52 | 53 | 66 | 67 | 72 | 73 | 74 | UPDATE user 75 | SET passWord = #{password} 76 | WHERE userId = #{userId} 77 | 78 | 79 | -------------------------------------------------------------------------------- /src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/test/java/com/fastcampus/boardserver/BoardServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.fastcampus.boardserver; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class BoardServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /게시판 서버 아키텍처.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccommit-dev/Board-Server/94c9c585e9bd7230727fab8d0e081fc8da5c73c5/게시판 서버 아키텍처.drawio.png -------------------------------------------------------------------------------- /이슈별 실습 내용.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ccommit-dev/Board-Server/94c9c585e9bd7230727fab8d0e081fc8da5c73c5/이슈별 실습 내용.drawio.png --------------------------------------------------------------------------------