Browse Source

init

pull/1/head
palnet 3 years ago
commit
e00709b111
  1. 243
      .gitignore
  2. BIN
      .mvn/wrapper/maven-wrapper.jar
  3. 2
      .mvn/wrapper/maven-wrapper.properties
  4. 22
      HELP.md
  5. 316
      mvnw
  6. 188
      mvnw.cmd
  7. 143
      pom.xml
  8. 13
      src/main/java/com/palnet/board/PalFrameworkApplication.java
  9. 21
      src/main/java/com/palnet/board/app/controller/BoardController.java
  10. 32
      src/main/java/com/palnet/board/app/controller/BoardRestController.java
  11. 13
      src/main/java/com/palnet/board/app/dto/BoardDto.java
  12. 10
      src/main/java/com/palnet/board/app/dto/RequestBoard.java
  13. 10
      src/main/java/com/palnet/board/app/dto/ResponseBoard.java
  14. 60
      src/main/java/com/palnet/board/app/jh/controller/JunheeBoardController.java
  15. 90
      src/main/java/com/palnet/board/app/jh/controller/JunheeBoardRestController.java
  16. 13
      src/main/java/com/palnet/board/app/jh/controller/JunheeReplyController.java
  17. 36
      src/main/java/com/palnet/board/app/jh/controller/JunheeReplyRestController.java
  18. 17
      src/main/java/com/palnet/board/app/jh/dto/JunheeBoardDto.java
  19. 11
      src/main/java/com/palnet/board/app/jh/dto/JunheePageDto.java
  20. 22
      src/main/java/com/palnet/board/app/jh/dto/JunheeReplyDto.java
  21. 18
      src/main/java/com/palnet/board/app/jh/dto/JunheeRequestBoard.java
  22. 15
      src/main/java/com/palnet/board/app/jh/dto/JunheeResponseBoard.java
  23. 9
      src/main/java/com/palnet/board/app/jh/dto/JunheeResponsePrevNext.java
  24. 18
      src/main/java/com/palnet/board/app/jh/dto/JunheeResponseReply.java
  25. 31
      src/main/java/com/palnet/board/app/jh/mapper/JunheeBoardMapper.java
  26. 110
      src/main/java/com/palnet/board/app/jh/mapper/JunheeBoardMapper.xml
  27. 17
      src/main/java/com/palnet/board/app/jh/mapper/JunheeReplyMapper.java
  28. 29
      src/main/java/com/palnet/board/app/jh/mapper/JunheeReplyMapper.xml
  29. 27
      src/main/java/com/palnet/board/app/jh/service/JunheeBoardService.java
  30. 137
      src/main/java/com/palnet/board/app/jh/service/JunheeBoardServiceImpl.java
  31. 12
      src/main/java/com/palnet/board/app/jh/service/JunheeReplyService.java
  32. 43
      src/main/java/com/palnet/board/app/jh/service/JunheeReplyServiceImpl.java
  33. 48
      src/main/java/com/palnet/board/app/jw/controller/JwBoardController.java
  34. 116
      src/main/java/com/palnet/board/app/jw/controller/JwBoardRestController.java
  35. 21
      src/main/java/com/palnet/board/app/jw/dto/JwBoardDto.java
  36. 17
      src/main/java/com/palnet/board/app/jw/mapper/JwBoardMapper.java
  37. 67
      src/main/java/com/palnet/board/app/jw/mapper/JwBoardMapper.xml
  38. 16
      src/main/java/com/palnet/board/app/jw/service/JwBoardService.java
  39. 51
      src/main/java/com/palnet/board/app/jw/service/JwBoardServiceImpl.java
  40. 11
      src/main/java/com/palnet/board/app/mapper/BoardMapper.java
  41. 13
      src/main/java/com/palnet/board/app/mapper/BoardMapper.xml
  42. 26
      src/main/java/com/palnet/board/app/sample/controller/SampleBoardController.java
  43. 93
      src/main/java/com/palnet/board/app/sample/controller/SampleBoardRestController.java
  44. 17
      src/main/java/com/palnet/board/app/sample/dto/SampleBoardDto.java
  45. 18
      src/main/java/com/palnet/board/app/sample/dto/SampleBoardDto2.java
  46. 15
      src/main/java/com/palnet/board/app/sample/mapper/SampleBoardMapper.java
  47. 62
      src/main/java/com/palnet/board/app/sample/mapper/SampleBoardMapper.xml
  48. 13
      src/main/java/com/palnet/board/app/sample/service/SampleBoardService.java
  49. 41
      src/main/java/com/palnet/board/app/sample/service/SampleBoardServiceImpl.java
  50. 8
      src/main/java/com/palnet/board/app/service/BoardService.java
  51. 27
      src/main/java/com/palnet/board/app/service/BoardServiceImpl.java
  52. 23
      src/main/java/com/palnet/board/config/SwaggerConfig.java
  53. 33
      src/main/resources/application.yml
  54. 11
      src/main/webapp/WEB-INF/view/board/list.jsp
  55. 284
      src/main/webapp/WEB-INF/view/jh/board/detailView.jsp
  56. 191
      src/main/webapp/WEB-INF/view/jh/board/list.jsp
  57. 178
      src/main/webapp/WEB-INF/view/jh/board/modify.jsp
  58. 156
      src/main/webapp/WEB-INF/view/jh/board/write.jsp
  59. 182
      src/main/webapp/WEB-INF/view/jw/board/detail.jsp
  60. 94
      src/main/webapp/WEB-INF/view/jw/board/list.jsp
  61. 181
      src/main/webapp/WEB-INF/view/jw/board/modify.jsp
  62. 134
      src/main/webapp/WEB-INF/view/jw/board/write.jsp
  63. 11
      src/main/webapp/WEB-INF/view/main.jsp
  64. 124
      src/main/webapp/WEB-INF/view/sample/board/detail.jsp
  65. 88
      src/main/webapp/WEB-INF/view/sample/board/list.jsp
  66. 61
      src/main/webapp/web/css/common.css
  67. 101
      src/main/webapp/web/css/font.css
  68. BIN
      src/main/webapp/web/css/font/NotoSansKR-Black.otf
  69. BIN
      src/main/webapp/web/css/font/NotoSansKR-Black.woff
  70. BIN
      src/main/webapp/web/css/font/NotoSansKR-Black.woff2
  71. BIN
      src/main/webapp/web/css/font/NotoSansKR-Bold.otf
  72. BIN
      src/main/webapp/web/css/font/NotoSansKR-Bold.woff
  73. BIN
      src/main/webapp/web/css/font/NotoSansKR-Bold.woff2
  74. BIN
      src/main/webapp/web/css/font/NotoSansKR-Light.otf
  75. BIN
      src/main/webapp/web/css/font/NotoSansKR-Light.woff
  76. BIN
      src/main/webapp/web/css/font/NotoSansKR-Light.woff2
  77. BIN
      src/main/webapp/web/css/font/NotoSansKR-Medium.otf
  78. BIN
      src/main/webapp/web/css/font/NotoSansKR-Medium.woff
  79. BIN
      src/main/webapp/web/css/font/NotoSansKR-Medium.woff2
  80. BIN
      src/main/webapp/web/css/font/NotoSansKR-Regular.otf
  81. BIN
      src/main/webapp/web/css/font/NotoSansKR-Regular.woff
  82. BIN
      src/main/webapp/web/css/font/NotoSansKR-Regular.woff2
  83. BIN
      src/main/webapp/web/css/font/NotoSansKR-Thin.otf
  84. BIN
      src/main/webapp/web/css/font/NotoSansKR-Thin.woff
  85. BIN
      src/main/webapp/web/css/font/NotoSansKR-Thin.woff2
  86. BIN
      src/main/webapp/web/css/font/S-CoreDream-1Thin.eot
  87. BIN
      src/main/webapp/web/css/font/S-CoreDream-1Thin.ttf
  88. BIN
      src/main/webapp/web/css/font/S-CoreDream-1Thin.woff
  89. BIN
      src/main/webapp/web/css/font/S-CoreDream-1Thin.woff2
  90. BIN
      src/main/webapp/web/css/font/S-CoreDream-2ExtraLight.eot
  91. BIN
      src/main/webapp/web/css/font/S-CoreDream-2ExtraLight.ttf
  92. BIN
      src/main/webapp/web/css/font/S-CoreDream-2ExtraLight.woff
  93. BIN
      src/main/webapp/web/css/font/S-CoreDream-2ExtraLight.woff2
  94. BIN
      src/main/webapp/web/css/font/S-CoreDream-3Light.eot
  95. BIN
      src/main/webapp/web/css/font/S-CoreDream-3Light.ttf
  96. BIN
      src/main/webapp/web/css/font/S-CoreDream-3Light.woff
  97. BIN
      src/main/webapp/web/css/font/S-CoreDream-3Light.woff2
  98. BIN
      src/main/webapp/web/css/font/S-CoreDream-4Regular.eot
  99. BIN
      src/main/webapp/web/css/font/S-CoreDream-4Regular.ttf
  100. BIN
      src/main/webapp/web/css/font/S-CoreDream-4Regular.woff
  101. Some files were not shown because too many files have changed in this diff Show More

243
.gitignore vendored

@ -0,0 +1,243 @@
# Created by https://www.toptal.com/developers/gitignore/api/eclipse,intellij,windows,macos
# Edit at https://www.toptal.com/developers/gitignore?templates=eclipse,intellij,windows,macos
### Eclipse ###
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
.classpath
.project
target
*/target/**
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# PyDev specific (Python IDE for Eclipse)
*.pydevproject
# CDT-specific (C/C++ Development Tooling)
.cproject
# CDT- autotools
.autotools
# Java annotation processor (APT)
.factorypath
# PDT-specific (PHP Development Tools)
.buildpath
# sbteclipse plugin
.target
# Tern plugin
.tern-project
# TeXlipse plugin
.texlipse
# STS (Spring Tool Suite)
.springBeans
# Code Recommenders
.recommenders/
# Annotation Processing
.apt_generated/
.apt_generated_test/
# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet
# Uncomment this line if you wish to ignore the project description file.
# Typically, this file would be tracked if it contains build/dependency configurations:
#.project
### Eclipse Patch ###
# Spring Boot Tooling
.sts4-cache/
### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/
# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml
# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/
# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$
# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### macOS Patch ###
# iCloud generated files
*.icloud
### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# End of https://www.toptal.com/developers/gitignore/api/eclipse,intellij,windows,macos

BIN
.mvn/wrapper/maven-wrapper.jar vendored

Binary file not shown.

2
.mvn/wrapper/maven-wrapper.properties vendored

@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

22
HELP.md

@ -0,0 +1,22 @@
# Getting Started
### Reference Documentation
For further reference, please consider the following sections:
* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.6.7/maven-plugin/reference/html/)
* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.6.7/maven-plugin/reference/html/#build-image)
* [Spring REST Docs](https://docs.spring.io/spring-restdocs/docs/current/reference/html5/)
* [Validation](https://docs.spring.io/spring-boot/docs/2.6.7/reference/htmlsingle/#boot-features-validation)
* [Spring Data JPA](https://docs.spring.io/spring-boot/docs/2.6.7/reference/htmlsingle/#boot-features-jpa-and-spring-data)
* [Spring Web](https://docs.spring.io/spring-boot/docs/2.6.7/reference/htmlsingle/#boot-features-developing-web-applications)
### Guides
The following guides illustrate how to use some features concretely:
* [Validation](https://spring.io/guides/gs/validating-form-input/)
* [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/)
* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/)

316
mvnw vendored

@ -0,0 +1,316 @@
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Maven Start Up Batch script
#
# Required ENV vars:
# ------------------
# JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
# M2_HOME - location of maven2's installed home dir
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------
if [ -z "$MAVEN_SKIP_RC" ] ; then
if [ -f /usr/local/etc/mavenrc ] ; then
. /usr/local/etc/mavenrc
fi
if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi
if [ -f "$HOME/.mavenrc" ] ; then
. "$HOME/.mavenrc"
fi
fi
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "`uname`" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;;
Darwin*) darwin=true
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
export JAVA_HOME="`/usr/libexec/java_home`"
else
export JAVA_HOME="/Library/Java/Home"
fi
fi
;;
esac
if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=`java-config --jre-home`
fi
fi
if [ -z "$M2_HOME" ] ; then
## resolve links - $0 may be a link to maven's home
PRG="$0"
# need this for relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
saveddir=`pwd`
M2_HOME=`dirname "$PRG"`/..
# make it fully qualified
M2_HOME=`cd "$M2_HOME" && pwd`
cd "$saveddir"
# echo Using m2 at $M2_HOME
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --unix "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$M2_HOME" ] &&
M2_HOME="`(cd "$M2_HOME"; pwd)`"
[ -n "$JAVA_HOME" ] &&
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
fi
if [ -z "$JAVA_HOME" ]; then
javaExecutable="`which javac`"
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
readLink=`which readlink`
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
if $darwin ; then
javaHome="`dirname \"$javaExecutable\"`"
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
else
javaExecutable="`readlink -f \"$javaExecutable\"`"
fi
javaHome="`dirname \"$javaExecutable\"`"
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
fi
fi
if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD="`\\unset -f command; \\command -v java`"
fi
fi
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly." >&2
echo " We cannot execute $JAVACMD" >&2
exit 1
fi
if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set."
fi
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
if [ -z "$1" ]
then
echo "Path not specified to find_maven_basedir"
return 1
fi
basedir="$1"
wdir="$1"
while [ "$wdir" != '/' ] ; do
if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir
break
fi
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
wdir=`cd "$wdir/.."; pwd`
fi
# end of workaround
done
echo "${basedir}"
}
# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
echo "$(tr -s '\n' ' ' < "$1")"
fi
}
BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
exit 1;
fi
##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data.
##########################################################################################
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found .mvn/wrapper/maven-wrapper.jar"
fi
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
fi
if [ -n "$MVNW_REPOURL" ]; then
jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
else
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
fi
while IFS="=" read key value; do
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
esac
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
if [ "$MVNW_VERBOSE" = true ]; then
echo "Downloading from: $jarUrl"
fi
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
if $cygwin; then
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
fi
if command -v wget > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found wget ... using wget"
fi
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
else
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
fi
elif command -v curl > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found curl ... using curl"
fi
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
curl -o "$wrapperJarPath" "$jarUrl" -f
else
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
fi
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Falling back to using Java to download"
fi
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
# For Cygwin, switch paths to Windows format before running javac
if $cygwin; then
javaClass=`cygpath --path --windows "$javaClass"`
fi
if [ -e "$javaClass" ]; then
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
echo " - Compiling MavenWrapperDownloader.java ..."
fi
# Compiling the Java class
("$JAVA_HOME/bin/javac" "$javaClass")
fi
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
# Running the downloader
if [ "$MVNW_VERBOSE" = true ]; then
echo " - Running MavenWrapperDownloader.java ..."
fi
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
fi
fi
fi
fi
##########################################################################################
# End of extension
##########################################################################################
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
if [ "$MVNW_VERBOSE" = true ]; then
echo $MAVEN_PROJECTBASEDIR
fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --path --windows "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi
# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
export MAVEN_CMD_LINE_ARGS
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
exec "$JAVACMD" \
$MAVEN_OPTS \
$MAVEN_DEBUG_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" \
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

188
mvnw.cmd vendored

@ -0,0 +1,188 @@
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
if "%MVNW_VERBOSE%" == "true" (
echo Found %WRAPPER_JAR%
)
) else (
if not "%MVNW_REPOURL%" == "" (
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
)
if "%MVNW_VERBOSE%" == "true" (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %DOWNLOAD_URL%
)
powershell -Command "&{"^
"$webclient = new-object System.Net.WebClient;"^
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
"}"
if "%MVNW_VERBOSE%" == "true" (
echo Finished downloading %WRAPPER_JAR%
)
)
@REM End of extension
@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*
%MAVEN_JAVA_EXE% ^
%JVM_CONFIG_MAVEN_PROPS% ^
%MAVEN_OPTS% ^
%MAVEN_DEBUG_OPTS% ^
-classpath %WRAPPER_JAR% ^
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%"=="on" pause
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
cmd /C exit /B %ERROR_CODE%

143
pom.xml

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.7</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>pal_framework</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>pal_framework</name>
<description>pal_framework</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.restdocs</groupId>
<artifactId>spring-restdocs-mockmvc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jdbc</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId>
<version>3.1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper-spring-boot-starter -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.4.2</version>
</dependency>
</dependencies>
<build>
<!--
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
-->
<plugins>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.8</version>
<executions>
<execution>
<id>generate-docs</id>
<phase>prepare-package</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<backend>html</backend>
<doctype>book</doctype>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>

13
src/main/java/com/palnet/board/PalFrameworkApplication.java

@ -0,0 +1,13 @@
package com.palnet.board;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class PalFrameworkApplication {
public static void main(String[] args) {
SpringApplication.run(PalFrameworkApplication.class, args);
}
}

21
src/main/java/com/palnet/board/app/controller/BoardController.java

@ -0,0 +1,21 @@
package com.palnet.board.app.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class BoardController {
@GetMapping("/")
public String main() {
return "main";
}
@GetMapping("/board/list")
public String list() {
return "board/list";
}
}

32
src/main/java/com/palnet/board/app/controller/BoardRestController.java

@ -0,0 +1,32 @@
package com.palnet.board.app.controller;
import com.palnet.board.app.dto.RequestBoard;
import com.palnet.board.app.dto.ResponseBoard;
import com.palnet.board.app.sample.service.SampleBoardService;
import com.palnet.board.app.service.BoardService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/board")
public class BoardRestController {
private BoardService boardService;
@GetMapping("/sample")
public ResponseEntity<ResponseBoard> test(@RequestBody RequestBoard requestBoard) throws Exception {
ResponseBoard responseBoard = boardService.test(requestBoard);
return ResponseEntity.status(HttpStatus.OK).body(responseBoard);
}
}

13
src/main/java/com/palnet/board/app/dto/BoardDto.java

@ -0,0 +1,13 @@
package com.palnet.board.app.dto;
import lombok.Data;
@Data
public class BoardDto {
private int sample_sno;
private String sample1;
private String sample2;
// 필요한 필드 추가
}

10
src/main/java/com/palnet/board/app/dto/RequestBoard.java

@ -0,0 +1,10 @@
package com.palnet.board.app.dto;
import lombok.Data;
@Data
public class RequestBoard {
private int sample_sno;
// 필요한 필드 추가
}

10
src/main/java/com/palnet/board/app/dto/ResponseBoard.java

@ -0,0 +1,10 @@
package com.palnet.board.app.dto;
import lombok.Data;
@Data
public class ResponseBoard {
private String sample;
// 필요한 필드 추가
}

60
src/main/java/com/palnet/board/app/jh/controller/JunheeBoardController.java

@ -0,0 +1,60 @@
package com.palnet.board.app.jh.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;
@Controller
@RequestMapping("/view/jh/board")
@Slf4j
public class JunheeBoardController {
@GetMapping("/")
public String main() {
return "main";
}
@GetMapping("/list")
public String list() {
log.info("list로 이동");
return "/jh/board/list";
}
@GetMapping("/list/{pageNum}")
public String list(@PathVariable String pageNum, Model model) {
log.info("list로 이동");
model.addAttribute("pageNum", pageNum);
return "/jh/board/list";
}
@GetMapping("/detailView/{id}")
public String detailView(@PathVariable String id, Model model) {
log.info("detailView로 이동");
model.addAttribute("id", id);
return "/jh/board/detailView";
}
@GetMapping("/write")
public String write() {
log.info("글쓰기로 이동");
return "jh/board/write";
}
@GetMapping("/modify/{id}")
public String modify(@PathVariable String id, Model model) {
log.info("modify로 이동");
model.addAttribute("id", id);
return "/jh/board/modify";
}
}

90
src/main/java/com/palnet/board/app/jh/controller/JunheeBoardRestController.java

@ -0,0 +1,90 @@
package com.palnet.board.app.jh.controller;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.board.app.jh.dto.JunheePageDto;
import com.palnet.board.app.jh.dto.JunheeRequestBoard;
import com.palnet.board.app.jh.dto.JunheeResponseBoard;
import com.palnet.board.app.jh.dto.JunheeResponsePrevNext;
import com.palnet.board.app.jh.service.JunheeBoardService;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/jh/board")
public class JunheeBoardRestController {
final static Logger log = LoggerFactory.getLogger(JunheeBoardRestController.class);
private final JunheeBoardService BoardService;
@GetMapping("/detailView/{id}")
public ResponseEntity<JunheeResponseBoard> detailView(@PathVariable String id) throws Exception {
JunheeResponseBoard responseBoard = BoardService.detailView(id);
return ResponseEntity.status(HttpStatus.OK).body(responseBoard);
}
@PostMapping("/write")
public ResponseEntity<Integer> boardWrite(JunheeRequestBoard requestBoard) throws Exception {
int result = BoardService.boardWrite(requestBoard);
return ResponseEntity.status(HttpStatus.OK).body(result);
}
@DeleteMapping("/delete/{id}")
public ResponseEntity<Integer> boardDelete(@PathVariable String id) throws Exception {
int result = BoardService.boardDelete(id);
return ResponseEntity.status(HttpStatus.OK).body(result);
}
@PutMapping("/modify")
public ResponseEntity<Integer> boardModify(JunheeRequestBoard requestBoard) throws Exception {
int result = BoardService.boardModify(requestBoard);
return ResponseEntity.status(HttpStatus.OK).body(result);
}
@GetMapping("/boardMaxId")
public ResponseEntity<Integer> boardMaxId() throws Exception {
int boardMaxId = BoardService.boardMaxId();
return ResponseEntity.status(HttpStatus.OK).body(boardMaxId);
}
@GetMapping("/page/{pageNum}")
public ResponseEntity<List<JunheeResponseBoard>> selectListPage(@PathVariable int pageNum) throws Exception {
List<JunheeResponseBoard> responseBoard = BoardService.selectListPage(pageNum);
return ResponseEntity.status(HttpStatus.OK).body(responseBoard);
}
@GetMapping("/pageHelp")
public ResponseEntity<JunheePageDto> pageHelp() throws Exception {
JunheePageDto pageDto = BoardService.pageHelp();
return ResponseEntity.status(HttpStatus.OK).body(pageDto);
}
@GetMapping("/boardPrevNext/{id}")
public ResponseEntity<List<JunheeResponsePrevNext>> boardPrevNext(@PathVariable int id) throws Exception {
List<JunheeResponsePrevNext> response = BoardService.boardPrevNext(id);
return ResponseEntity.status(HttpStatus.OK).body(response);
}
}

13
src/main/java/com/palnet/board/app/jh/controller/JunheeReplyController.java

@ -0,0 +1,13 @@
package com.palnet.board.app.jh.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import lombok.extern.slf4j.Slf4j;
@Controller
@RequestMapping("/view/jh/reply")
@Slf4j
public class JunheeReplyController {
}

36
src/main/java/com/palnet/board/app/jh/controller/JunheeReplyRestController.java

@ -0,0 +1,36 @@
package com.palnet.board.app.jh.controller;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.board.app.jh.dto.JunheeReplyDto;
import com.palnet.board.app.jh.dto.JunheeResponseReply;
import com.palnet.board.app.jh.service.JunheeReplyService;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/jh/reply")
public class JunheeReplyRestController {
final static Logger log = LoggerFactory.getLogger(JunheeReplyRestController.class);
private final JunheeReplyService ReplyService;
@GetMapping("/boardReply/{boardId}")
public ResponseEntity<List<JunheeResponseReply>> viewReply(@PathVariable int boardId) throws Exception {
List<JunheeResponseReply> responseReply = ReplyService.viewReply(boardId);
return ResponseEntity.status(HttpStatus.OK).body(responseReply);
}
}

17
src/main/java/com/palnet/board/app/jh/dto/JunheeBoardDto.java

@ -0,0 +1,17 @@
package com.palnet.board.app.jh.dto;
import lombok.Data;
import org.apache.ibatis.type.Alias;
@Data
@Alias("JunheeBoardDto")
public class JunheeBoardDto {
private int id;
private String title;
private String content;
private String password;
private String updUser;
private String updDtm;
private String regUser;
private String regDtm;
}

11
src/main/java/com/palnet/board/app/jh/dto/JunheePageDto.java

@ -0,0 +1,11 @@
package com.palnet.board.app.jh.dto;
import lombok.Data;
import org.apache.ibatis.type.Alias;
@Data
@Alias("JunheePageDto")
public class JunheePageDto {
private int maxPageNum;
private int boardCount;
}

22
src/main/java/com/palnet/board/app/jh/dto/JunheeReplyDto.java

@ -0,0 +1,22 @@
package com.palnet.board.app.jh.dto;
import java.util.List;
import org.apache.ibatis.type.Alias;
import lombok.Data;
@Data
@Alias("JunheeReplyDto")
public class JunheeReplyDto {
private int id;
private int boardId;
private int targetId;
private String content;
private String updUser;
private String updDtm;
private String regUser;
private String regDate;
private List<JunheeReplyDto> targetReplys;
}

18
src/main/java/com/palnet/board/app/jh/dto/JunheeRequestBoard.java

@ -0,0 +1,18 @@
package com.palnet.board.app.jh.dto;
import lombok.Data;
import org.apache.ibatis.type.Alias;
@Data
public class JunheeRequestBoard {
/* 글 작성(insert)시 사용 */
int id;
String title;
String content;
String password;
String regUser;
String regDtm;
String updUser;
String updDtm;
}

15
src/main/java/com/palnet/board/app/jh/dto/JunheeResponseBoard.java

@ -0,0 +1,15 @@
package com.palnet.board.app.jh.dto;
import lombok.Data;
@Data
public class JunheeResponseBoard {
private int id;
private String password;
private String title;
private String content;
private String regUser;
private String regDtm;
private String updUser;
// private String updDtm;
}

9
src/main/java/com/palnet/board/app/jh/dto/JunheeResponsePrevNext.java

@ -0,0 +1,9 @@
package com.palnet.board.app.jh.dto;
import lombok.Data;
@Data
public class JunheeResponsePrevNext {
private int id;
private String title;
}

18
src/main/java/com/palnet/board/app/jh/dto/JunheeResponseReply.java

@ -0,0 +1,18 @@
package com.palnet.board.app.jh.dto;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
@Data
public class JunheeResponseReply {
private int id;
private int boardId;
private int targetId;
private String content;
private String regUser;
private String regDate;
private List<JunheeResponseReply> targetReplys;
}

31
src/main/java/com/palnet/board/app/jh/mapper/JunheeBoardMapper.java

@ -0,0 +1,31 @@
package com.palnet.board.app.jh.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.palnet.board.app.jh.dto.JunheeBoardDto;
import com.palnet.board.app.jh.dto.JunheeRequestBoard;
import com.palnet.board.app.jh.dto.JunheeResponsePrevNext;
@Mapper
public interface JunheeBoardMapper {
JunheeBoardDto detailView(String id) throws Exception;
int boardWrite(JunheeRequestBoard requestBoard) throws Exception;
int boardDelete(String id) throws Exception;
int boardModify(JunheeRequestBoard requestBoard) throws Exception;
int boardMaxId() throws Exception;
List<JunheeBoardDto> selectListPage(@Param("startNum") int startNum, @Param("endNum") int endNum) throws Exception;
int boardCount() throws Exception;
List<JunheeResponsePrevNext> boardPrevNext(int id) throws Exception;
}

110
src/main/java/com/palnet/board/app/jh/mapper/JunheeBoardMapper.xml

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.palnet.board.app.jh.mapper.JunheeBoardMapper">
<select id="detailView" resultType="com.palnet.board.app.jh.dto.JunheeBoardDto">
SELECT
ID,
TITLE,
CONTENT,
PASSWORD,
REG_USER,
REG_DTM,
UPD_USER
FROM TB_COM_BOARD
WHERE ID = #{id}
</select>
<insert id="boardWrite">
INSERT INTO TB_COM_BOARD(
ID,
TITLE,
CONTENT,
PASSWORD,
UPD_USER,
UPD_DTM,
REG_USER,
REG_DTM
)VALUES(
#{id},
#{title},
#{content},
#{password},
null,
null,
#{regUser},
SYSDATE()
);
</insert>
<delete id="boardDelete">
DELETE
FROM TB_COM_BOARD
WHERE ID = #{id}
</delete>
<update id="boardModify">
UPDATE
TB_COM_BOARD
SET
TITLE = #{title},
CONTENT = #{content},
PASSWORD = #{password},
UPD_USER = #{updUser},
UPD_DTM = SYSDATE()
WHERE
ID = #{id}
</update>
<select id="boardMaxId" resultType="int">
SELECT MAX(ID)
FROM TB_COM_BOARD
</select>
<select id="selectListPage" resultType="com.palnet.board.app.jh.dto.JunheeBoardDto">
SELECT
ID,
TITLE,
REG_USER,
REG_DTM,
UPD_USER
<!-- UPD_DTM -->
FROM TB_COM_BOARD
LIMIT #{endNum}
OFFSET #{startNum}
</select>
<select id="boardCount" resultType="int">
SELECT COUNT(*)
FROM TB_COM_BOARD
</select>
<!-- <select id="prevInfo" resultType="com.palnet.board.app.jh.dto.JunheeBoardDto">
SELECT
ID,
TITLE
FROM TB_COM_BOARD
WHERE
ID = #{prevId}
</select>
<select id="nextInfo" resultType="com.palnet.board.app.jh.dto.JunheeBoardDto">
SELECT
ID,
TITLE
FROM TB_COM_BOARD
WHERE
ID = #{nextId}
</select> -->
<select id="boardPrevNext" resultType="com.palnet.board.app.jh.dto.JunheeResponsePrevNext">
SELECT ID, TITLE
FROM TB_COM_BOARD
WHERE ID
IN(
<![CDATA[(SELECT ID FROM TB_COM_BOARD WHERE ID < #{id} ORDER BY ID DESC LIMIT 1),
(SELECT ID FROM TB_COM_BOARD WHERE ID > #{id} ORDER BY ID LIMIT 1)]]>
)
</select>
</mapper>

17
src/main/java/com/palnet/board/app/jh/mapper/JunheeReplyMapper.java

@ -0,0 +1,17 @@
package com.palnet.board.app.jh.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import com.palnet.board.app.jh.dto.JunheeReplyDto;
import com.palnet.board.app.jh.dto.JunheeResponseReply;
@Mapper
public interface JunheeReplyMapper {
List<JunheeReplyDto> viewReply(int boardId) throws Exception;
List<JunheeReplyDto> targetDivide(int id) throws Exception;
}

29
src/main/java/com/palnet/board/app/jh/mapper/JunheeReplyMapper.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.palnet.board.app.jh.mapper.JunheeReplyMapper">
<select id="viewReply" resultType="com.palnet.board.app.jh.dto.JunheeReplyDto">
SELECT
ID,
BOARD_ID,
TARGET_ID,
CONTENT,
REG_USER,
REG_DATE
FROM TB_COM_COMMENT
WHERE BOARD_ID = #{boardId}
</select>
<select id="targetDivide" resultType="com.palnet.board.app.jh.dto.JunheeReplyDto">
SELECT
ID,
BOARD_ID,
TARGET_ID,
CONTENT,
REG_USER,
REG_DATE
FROM TB_COM_COMMENT
WHERE TARGET_ID = #{id}
</select>
</mapper>

27
src/main/java/com/palnet/board/app/jh/service/JunheeBoardService.java

@ -0,0 +1,27 @@
package com.palnet.board.app.jh.service;
import java.util.List;
import com.palnet.board.app.jh.dto.JunheePageDto;
import com.palnet.board.app.jh.dto.JunheeRequestBoard;
import com.palnet.board.app.jh.dto.JunheeResponseBoard;
import com.palnet.board.app.jh.dto.JunheeResponsePrevNext;
public interface JunheeBoardService {
JunheeResponseBoard detailView(String id) throws Exception;
int boardWrite(JunheeRequestBoard requestBoard) throws Exception;
int boardDelete(String id) throws Exception;
int boardModify(JunheeRequestBoard requestBoard) throws Exception;
int boardMaxId() throws Exception;
List<JunheeResponseBoard> selectListPage(int pageNum) throws Exception;
JunheePageDto pageHelp() throws Exception;
List<JunheeResponsePrevNext> boardPrevNext(int id) throws Exception;
}

137
src/main/java/com/palnet/board/app/jh/service/JunheeBoardServiceImpl.java

@ -0,0 +1,137 @@
package com.palnet.board.app.jh.service;
import java.util.ArrayList;
import java.util.List;
import org.springframework.stereotype.Service;
import com.palnet.board.app.jh.dto.JunheeBoardDto;
import com.palnet.board.app.jh.dto.JunheePageDto;
import com.palnet.board.app.jh.dto.JunheeRequestBoard;
import com.palnet.board.app.jh.dto.JunheeResponseBoard;
import com.palnet.board.app.jh.dto.JunheeResponsePrevNext;
import com.palnet.board.app.jh.mapper.JunheeBoardMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@RequiredArgsConstructor
@Service
@Slf4j
public class JunheeBoardServiceImpl implements JunheeBoardService{
private final JunheeBoardMapper BoardMapper;
/* 글 상세보기 */
@Override
public JunheeResponseBoard detailView(String id) throws Exception {
JunheeBoardDto boardDto = BoardMapper.detailView(id);
JunheeResponseBoard responseBoard = new JunheeResponseBoard();
responseBoard.setId(boardDto.getId());
responseBoard.setPassword(boardDto.getPassword());
responseBoard.setTitle(boardDto.getTitle());
responseBoard.setContent(boardDto.getContent());
responseBoard.setRegUser(boardDto.getRegUser());
responseBoard.setRegDtm(boardDto.getRegDtm());
responseBoard.setUpdUser(boardDto.getUpdUser());
return responseBoard;
}
/* 글 작성하기 */
@Override
public int boardWrite(JunheeRequestBoard requestBoard) throws Exception {
int result = BoardMapper.boardWrite(requestBoard);
return result;
}
/* 글 삭제하기 */
@Override
public int boardDelete(String id) throws Exception {
int result = BoardMapper.boardDelete(id);
return result;
}
/* 글 수정하기 */
@Override
public int boardModify(JunheeRequestBoard requestBoard) throws Exception {
int result = BoardMapper.boardModify(requestBoard);
return result;
}
/* 글 번호 자동부여 */
@Override
public int boardMaxId() throws Exception{
int boardId = BoardMapper.boardMaxId();
return boardId;
}
/* 쿼리문으로 페이징하기 */
@Override
public List<JunheeResponseBoard> selectListPage(int pageNum) throws Exception {
int endNum = 7;
int startNum = (pageNum * endNum) - endNum;
List<JunheeBoardDto> boardDto = BoardMapper.selectListPage(startNum, endNum);
List<JunheeResponseBoard> boardList = new ArrayList<JunheeResponseBoard>();
for(JunheeBoardDto board : boardDto) {
JunheeResponseBoard responseBoard = new JunheeResponseBoard();
responseBoard.setId(board.getId());
responseBoard.setTitle(board.getTitle());
responseBoard.setRegUser(board.getRegUser());
responseBoard.setRegDtm(board.getRegDtm());
responseBoard.setUpdUser(board.getUpdUser());
boardList.add(responseBoard);
}
return boardList;
}
/* 전체 게시글 수 & 마지막 페이지 숫자 */
@Override
public JunheePageDto pageHelp() throws Exception {
int boardCount = BoardMapper.boardCount();
int boardViewCount = 7; //화면에 보여지는 게시글 수
int maxPageNum = 0;
if((boardCount % boardViewCount) == 0) {
maxPageNum = boardCount/boardViewCount;
} else {
maxPageNum = (boardCount/boardViewCount) + 1;
}
JunheePageDto pageDto = new JunheePageDto();
pageDto.setBoardCount(boardCount);
pageDto.setMaxPageNum(maxPageNum);
return pageDto;
}
/* 이전글 / 다음글 id, title */
@Override
public List<JunheeResponsePrevNext> boardPrevNext(int id) throws Exception {
List<JunheeResponsePrevNext> boardPrevNext = BoardMapper.boardPrevNext(id);
List<JunheeResponsePrevNext> boardList = new ArrayList<JunheeResponsePrevNext>();
for(JunheeResponsePrevNext board : boardPrevNext) {
JunheeResponsePrevNext responseBoard = new JunheeResponsePrevNext();
responseBoard.setId(board.getId());
responseBoard.setTitle(board.getTitle());
boardList.add(responseBoard);
}
return boardList;
}
}

12
src/main/java/com/palnet/board/app/jh/service/JunheeReplyService.java

@ -0,0 +1,12 @@
package com.palnet.board.app.jh.service;
import java.util.List;
import com.palnet.board.app.jh.dto.JunheeReplyDto;
import com.palnet.board.app.jh.dto.JunheeResponseReply;
public interface JunheeReplyService {
List<JunheeResponseReply> viewReply(int boardId) throws Exception;
}

43
src/main/java/com/palnet/board/app/jh/service/JunheeReplyServiceImpl.java

@ -0,0 +1,43 @@
package com.palnet.board.app.jh.service;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import org.modelmapper.ModelMapper;
import org.springframework.stereotype.Service;
import com.palnet.board.app.jh.dto.JunheeReplyDto;
import com.palnet.board.app.jh.dto.JunheeResponseReply;
import com.palnet.board.app.jh.mapper.JunheeReplyMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@RequiredArgsConstructor
@Service
@Slf4j
public class JunheeReplyServiceImpl implements JunheeReplyService {
private final JunheeReplyMapper ReplyMapper;
@Override
public List<JunheeResponseReply> viewReply(int boardId) throws Exception {
List<JunheeReplyDto> replyParent = ReplyMapper.viewReply(boardId); //전체 댓글
List<JunheeReplyDto> targetReply = new ArrayList<>(); //자식 댓글 담을 곳
for(JunheeReplyDto reply : replyParent) {
targetReply = ReplyMapper.targetDivide(reply.getId()); //자식 댓글 담기~
reply.setTargetReplys(targetReply);
}
List<JunheeResponseReply> responseReply = new ArrayList<JunheeResponseReply>(); //최종 담을 객체
/* 자식까지 담은 부모를 response로 한번에 담기! */
responseReply = replyParent.stream().map(reply ->
new ModelMapper().map(reply, JunheeResponseReply.class)).collect(Collectors.toList());
return responseReply;
}
}

48
src/main/java/com/palnet/board/app/jw/controller/JwBoardController.java

@ -0,0 +1,48 @@
package com.palnet.board.app.jw.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.palnet.board.app.dto.BoardDto;
import com.palnet.board.app.service.BoardService;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@Controller
@RequestMapping("/view/jw/board")
public class JwBoardController {
@GetMapping("/list")
public String list() {
return "jw/board/list";
}
@GetMapping("/detail/{id}")
public String detail(@PathVariable String id, Model model) {
model.addAttribute("id", id);
log.info(">> {}", id);
return "jw/board/detail";
}
@GetMapping("/write")
public String write() {
return "jw/board/write";
}
@GetMapping("/modify/{id}")
public String update(@PathVariable String id, Model model) {
model.addAttribute("id", id);
return "jw/board/modify";
}
}

116
src/main/java/com/palnet/board/app/jw/controller/JwBoardRestController.java

@ -0,0 +1,116 @@
package com.palnet.board.app.jw.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.board.app.jw.dto.JwBoardDto;
import com.palnet.board.app.jw.service.JwBoardService;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/jw/board")
public class JwBoardRestController {
final static Logger log = LoggerFactory.getLogger(JwBoardRestController.class);
private final JwBoardService BoardService;
// 글 목록 조회
@GetMapping("/list")
public List<JwBoardDto> list() {
return BoardService.list();
}
// 글 상세 조회
@GetMapping("/detail/{id}")
public JwBoardDto detail(@PathVariable Integer id) {
return BoardService.detail(id);
}
// 글 등록
@PostMapping("/create")
public Map create(@RequestBody JwBoardDto rq) {
Map<String, String> res = new HashMap<>();
try {
int cnt = BoardService.create(rq);
if (cnt > 0) {
res.put("result", "success");
} else {
res.put("result", "fail");
}
} catch (Exception e) {
log.error("{}", e);
res.put("result", "fail");
}
return res;
}
// 글 수정
@PutMapping("/modify/{id}")
public Map update(@RequestBody JwBoardDto rq) {
Map<String, String> res = new HashMap<>();
try {
int cnt = BoardService.update(rq);
if (cnt > 0) {
res.put("result", "success");
} else {
res.put("result", "fail");
}
} catch (Exception e) {
log.error("{}", e);
res.put("result", "fail");
}
return res;
}
// 글 삭제
@DeleteMapping("/delete/{id}")
public Map delete(@PathVariable Integer id) {
Map<String, String> res = new HashMap<>();
try {
int cnt = BoardService.delete(id);
if (cnt > 0) {
res.put("result", "success");
} else {
res.put("result", "fail");
}
} catch (Exception e) {
log.error("{}", e);
res.put("result", "fail");
}
return res;
}
@PostMapping("/post")
public String post(@RequestBody JwBoardDto boardDto) {
log.debug(">> {}", boardDto);
log.info(">> {}", boardDto);
BoardService.create(boardDto);
return "{}";
}
@GetMapping("/index")
public ResponseEntity<Integer> index() throws Exception{
int index = BoardService.index();
return ResponseEntity.status(HttpStatus.OK).body(index);
}
}

21
src/main/java/com/palnet/board/app/jw/dto/JwBoardDto.java

@ -0,0 +1,21 @@
package com.palnet.board.app.jw.dto;
import org.apache.ibatis.type.Alias;
import lombok.Data;
@Data
@Alias("JwBoardDto")
public class JwBoardDto {
private String id;
private String title;
private String content;
private String password;
private String updUser;
private String updDtm;
private String regUser;
private String regDtm;
// 필요한 필드 추가
}

17
src/main/java/com/palnet/board/app/jw/mapper/JwBoardMapper.java

@ -0,0 +1,17 @@
package com.palnet.board.app.jw.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import com.palnet.board.app.jw.dto.JwBoardDto;
@Mapper
public interface JwBoardMapper {
public List<JwBoardDto> list();
public JwBoardDto detail(Integer id);
public int insert(JwBoardDto rq);
public int update(JwBoardDto rq);
public int delete(Integer id);
public int index() throws Exception;
}

67
src/main/java/com/palnet/board/app/jw/mapper/JwBoardMapper.xml

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.palnet.board.app.jw.mapper.JwBoardMapper">
<select id="list" resultType="JwBoardDto">
SELECT * FROM TB_COM_BOARD
</select>
<!-- 글 상세 조회 -->
<select id="detail" resultType="JwBoardDto">
SELECT * FROM TB_COM_BOARD
WHERE ID = #{id}
</select>
<!-- 글 작성 -->
<insert id="insert">
INSERT INTO TB_COM_BOARD
(
<!-- ID, -->
TITLE,
CONTENT,
PASSWORD,
REG_USER,
REG_DTM
) VALUES (
<!-- #{id}, -->
#{title},
#{content},
#{password},
#{regUser},
now()
)
</insert>
<!-- 글 수정 -->
<update id="update">
UPDATE
TB_COM_BOARD
SET
<if test="title != null and title != ''">
TITLE = #{title},
</if>
<if test="content != null and content != ''">
CONTENT = #{content},
</if>
<if test="password != null and password != ''">
PASSWORD = #{password},
</if>
<if test="updUser != null and updUser != ''">
UPD_USER = #{updUser},
</if>
UPD_DTM = now()
WHERE
ID = #{id}
</update>
<!-- 글 삭제 -->
<delete id="delete">
DELETE FROM TB_COM_BOARD
WHERE ID = #{id}
</delete>
<!-- 글 번호 -->
<select id="index" resultType = "int">
SELECT MAX(ID)
FROM TB_COM_BOARD
</select>
</mapper>

16
src/main/java/com/palnet/board/app/jw/service/JwBoardService.java

@ -0,0 +1,16 @@
package com.palnet.board.app.jw.service;
import java.util.List;
import com.palnet.board.app.jw.dto.JwBoardDto;
public interface JwBoardService {
public List<JwBoardDto> list();
public JwBoardDto detail(Integer id);
public int create(JwBoardDto rq);
public int update(JwBoardDto rq);
public int delete(Integer id);
public int index() throws Exception;
}

51
src/main/java/com/palnet/board/app/jw/service/JwBoardServiceImpl.java

@ -0,0 +1,51 @@
package com.palnet.board.app.jw.service;
import java.util.List;
import org.springframework.stereotype.Service;
import com.palnet.board.app.jw.dto.JwBoardDto;
import com.palnet.board.app.jw.mapper.JwBoardMapper;
import com.palnet.board.app.mapper.BoardMapper;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Service
public class JwBoardServiceImpl implements JwBoardService {
private final JwBoardMapper BoardMapper;
@Override
public List<JwBoardDto> list() {
return BoardMapper.list();
}
@Override
public JwBoardDto detail(Integer id) {
return BoardMapper.detail(id);
}
@Override
public int create(JwBoardDto rq) {
return BoardMapper.insert(rq);
}
@Override
public int update(JwBoardDto rq) {
return BoardMapper.update(rq);
}
@Override
public int delete(Integer id) {
return BoardMapper.delete(id);
}
@Override
public int index() throws Exception {
int boardId = BoardMapper.index();
return boardId;
}
}

11
src/main/java/com/palnet/board/app/mapper/BoardMapper.java

@ -0,0 +1,11 @@
package com.palnet.board.app.mapper;
import com.palnet.board.app.dto.BoardDto;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface BoardMapper {
BoardDto selectSample(int sample_sno) throws Exception;
}

13
src/main/java/com/palnet/board/app/mapper/BoardMapper.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.palnet.board.app.mapper.BoardMapper">
<select id="selectSample" resultType="com.palnet.board.app.dto.BoardDto" >
SELECT
SAMPLE_SNO,
SAMPLE1,
SAMPLE2
FROM SAMPLE
WHERE SAMPLE_SNO = #{sample_sno}
</select>
</mapper>

26
src/main/java/com/palnet/board/app/sample/controller/SampleBoardController.java

@ -0,0 +1,26 @@
package com.palnet.board.app.sample.controller;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
@Slf4j
@Controller
@RequestMapping("/view/sample/board")
public class SampleBoardController {
@GetMapping("/list")
public String list(){
return "/sample/board/list";
}
@GetMapping("/detail/{id}")
public String detail(@PathVariable Integer id, Model model){
model.addAttribute("boardId", id);
return "/sample/board/detail";
}
}

93
src/main/java/com/palnet/board/app/sample/controller/SampleBoardRestController.java

@ -0,0 +1,93 @@
package com.palnet.board.app.sample.controller;
import com.palnet.board.app.sample.dto.SampleBoardDto;
import com.palnet.board.app.sample.service.SampleBoardService;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/sample/board")
public class SampleBoardRestController {
final static Logger log = LoggerFactory.getLogger(SampleBoardRestController.class);
private final SampleBoardService sampleBoardService;
// 글 목록 조회
@GetMapping("/list")
public List<SampleBoardDto> list(){
return sampleBoardService.list();
}
// 글 상세 조회
@GetMapping("/detail/{id}")
public SampleBoardDto detail(@PathVariable Integer id){
return sampleBoardService.detail(id);
}
// 글 등록
@PostMapping("/create")
public Map create(@RequestBody SampleBoardDto rq){
Map<String, String> res = new HashMap<>();
try {
int cnt = sampleBoardService.create(rq);
if(cnt > 0){
res.put("result", "success");
} else {
res.put("result", "fail");
}
} catch (Exception e){
log.error("{}", e);
res.put("result", "fail");
}
return res;
}
// 글 수정
@PutMapping("/update")
public Map update(@RequestBody SampleBoardDto rq){
Map<String, String> res = new HashMap<>();
try {
int cnt = sampleBoardService.update(rq);
if(cnt > 0){
res.put("result", "success");
} else {
res.put("result", "fail");
}
} catch (Exception e){
log.error("{}", e);
res.put("result", "fail");
}
return res;
}
// 글 삭제
@DeleteMapping("/delete/{id}")
public Map delete(@PathVariable Integer id){
Map<String, String> res = new HashMap<>();
try {
int cnt = sampleBoardService.delete(id);
if(cnt > 0){
res.put("result", "success");
} else {
res.put("result", "fail");
}
} catch (Exception e){
log.error("{}", e);
res.put("result", "fail");
}
return res;
}
}

17
src/main/java/com/palnet/board/app/sample/dto/SampleBoardDto.java

@ -0,0 +1,17 @@
package com.palnet.board.app.sample.dto;
import lombok.Data;
import org.apache.ibatis.type.Alias;
@Data
@Alias("sampleBoardDto")
public class SampleBoardDto {
private String id;
private String title;
private String content;
private String password;
private String updUser;
private String updDtm;
private String regUser;
private String regDtm;
}

18
src/main/java/com/palnet/board/app/sample/dto/SampleBoardDto2.java

@ -0,0 +1,18 @@
package com.palnet.board.app.sample.dto;
import lombok.Data;
import org.apache.ibatis.type.Alias;
@Data
@Alias("sampleBoardDto2")
public class SampleBoardDto2 {
private String etc;
private String id;
private String title;
private String content;
private String password;
private String updUser;
private String updDtm;
private String regUser;
private String regDtm;
}

15
src/main/java/com/palnet/board/app/sample/mapper/SampleBoardMapper.java

@ -0,0 +1,15 @@
package com.palnet.board.app.sample.mapper;
import com.palnet.board.app.sample.dto.SampleBoardDto;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface SampleBoardMapper {
public List<SampleBoardDto> list();
public SampleBoardDto detail(Integer id);
public int insert(SampleBoardDto rq);
public int update(SampleBoardDto rq);
public int delete(Integer id);
}

62
src/main/java/com/palnet/board/app/sample/mapper/SampleBoardMapper.xml

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.palnet.board.app.sample.mapper.SampleBoardMapper">
<!-- 글 목록 조회 -->
<select id="list" resultType="sampleBoardDto">
SELECT * FROM TB_COM_BOARD
</select>
<!-- 글 상세 조회 -->
<select id="detail" resultType="sampleBoardDto">
SELECT * FROM TB_COM_BOARD
WHERE ID = #{id}
</select>
<!-- 글 등록 -->
<insert id="insert">
INSERT INTO TB_COM_BOARD
(
TITLE,
CONTENT,
PASSWORD,
REG_USER,
REG_DTM
) VALUES (
#{title},
#{content},
#{password},
#{regUser},
now()
)
</insert>
<!-- 글 수정 -->
<update id="update">
UPDATE
TB_COM_BOARD
SET
<if test="title != null and title != ''">
TITLE = #{title},
</if>
<if test="content != null and content != ''">
CONTENT = #{content},
</if>
<if test="password != null and password != ''">
PASSWORD = #{password},
</if>
<if test="updUser != null and updUser != ''">
UPD_USER = #{updUser},
</if>
UPD_DTM = now()
WHERE
ID = #{id}
</update>
<!-- 글 삭제 -->
<delete id="delete">
DELETE FROM TB_COM_BOARD
WHERE ID = #{id}
</delete>
</mapper>

13
src/main/java/com/palnet/board/app/sample/service/SampleBoardService.java

@ -0,0 +1,13 @@
package com.palnet.board.app.sample.service;
import com.palnet.board.app.sample.dto.SampleBoardDto;
import java.util.List;
public interface SampleBoardService {
public List<SampleBoardDto> list();
public SampleBoardDto detail(Integer id);
public int create(SampleBoardDto rq);
public int update(SampleBoardDto rq);
public int delete(Integer id);
}

41
src/main/java/com/palnet/board/app/sample/service/SampleBoardServiceImpl.java

@ -0,0 +1,41 @@
package com.palnet.board.app.sample.service;
import com.palnet.board.app.sample.dto.SampleBoardDto;
import com.palnet.board.app.sample.mapper.SampleBoardMapper;
import lombok.RequiredArgsConstructor;
import org.modelmapper.ModelMapper;
import org.springframework.stereotype.Service;
import java.util.List;
@RequiredArgsConstructor
@Service
public class SampleBoardServiceImpl implements SampleBoardService{
private final SampleBoardMapper sampleBoardMapper;
@Override
public List<SampleBoardDto> list() {
return sampleBoardMapper.list();
}
@Override
public SampleBoardDto detail(Integer id) {
return sampleBoardMapper.detail(id);
}
@Override
public int create(SampleBoardDto rq) {
return sampleBoardMapper.insert(rq);
}
@Override
public int update(SampleBoardDto rq) {
return sampleBoardMapper.update(rq);
}
@Override
public int delete(Integer id) {
return sampleBoardMapper.delete(id);
}
}

8
src/main/java/com/palnet/board/app/service/BoardService.java

@ -0,0 +1,8 @@
package com.palnet.board.app.service;
import com.palnet.board.app.dto.RequestBoard;
import com.palnet.board.app.dto.ResponseBoard;
public interface BoardService {
ResponseBoard test(RequestBoard requestBoard) throws Exception;
}

27
src/main/java/com/palnet/board/app/service/BoardServiceImpl.java

@ -0,0 +1,27 @@
package com.palnet.board.app.service;
import com.palnet.board.app.dto.BoardDto;
import com.palnet.board.app.dto.RequestBoard;
import com.palnet.board.app.dto.ResponseBoard;
import com.palnet.board.app.mapper.BoardMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class BoardServiceImpl implements BoardService {
@Autowired
BoardMapper boardMapper;
@Override
public ResponseBoard test(RequestBoard requestBoard) throws Exception {
BoardDto boardDto = boardMapper.selectSample(requestBoard.getSample_sno());
ResponseBoard responseBoard = new ResponseBoard();
String result = boardDto.getSample2() + boardDto.getSample2();
responseBoard.setSample(result);
return responseBoard;
}
}

23
src/main/java/com/palnet/board/config/SwaggerConfig.java

@ -0,0 +1,23 @@
package com.palnet.board.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
@Configuration
public class SwaggerConfig {
@Bean
public Docket api(){
Docket doc = new Docket(DocumentationType.OAS_30)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.ant("/api/**"))
.build();
return doc;
}
}

33
src/main/resources/application.yml

@ -0,0 +1,33 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://13.125.97.21:3306/PAL_TEST?characterEncoding=UTF-8&autoReconnect=true&useSSL=false
username: pal_test
password: pal1234
mvc:
pathmatch:
matching-strategy: ant_path_matcher
view:
prefix: /WEB-INF/view/
suffix: .jsp
devtoos:
livereload:
enabled: true
mybatis:
mapper-locations: classpath:com.palnet.board.**.mapper.*.xml
type-aliases-package: com.palnet.board.**.dto
configuration:
map-underscore-to-camel-case: true
pagehelper:
helper-dialect: mysql
auto-dialect: true
page-size-zero: false
reasonable: true #pageNum을 가능한 값으로 변경해줌
offset-as-page-num: false
row-bounds-with-count: false
auto-runtime-dialect: false
close-conn: true
support-methods-arguments: true
default-count: true

11
src/main/webapp/WEB-INF/view/board/list.jsp

@ -0,0 +1,11 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Main</title>
</head>
<body>
board List
</body>
</html>

284
src/main/webapp/WEB-INF/view/jh/board/detailView.jsp

@ -0,0 +1,284 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!doctype html>
<html lang="ko" xml:lang="ko">
<% //Model로 넘겨받은 객체 불러오는 법ㅠㅠㅠㅠ
String boardId = (String) request.getAttribute("id");
%>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=0,maximum-scale=10,user-scalable=yes">
<!-- css -->
<link rel="stylesheet" href="/web/css/reset.css">
<link rel="stylesheet" href="/web/css/font.css">
<link rel="stylesheet" href="/web/css/common.css">
<!-- js -->
<script src="/web/js/lib/jquery-3.6.0.min.js"></script>
<!-- ajax/axios -->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.serializeObject/2.0.3/jquery.serializeObject.min.js"></script>
<title>View-팔네트웍스</title>
<style>
.btn{display: inline-flex;flex-direction: row;justify-content: center;align-items: center;height: 35px;border: 1px solid #ddd;}
</style>
</head>
<body>
<div class="notice">
<div class="row">
<div class="box">
<span class="ti">글쓴이</span>
<span class="box-input view" id="regUser"></span>
</div>
<div class="box" id="pwHidden">
<span class="ti">비밀번호</span>
<span class="box-input view" id="password"></span>
<input id="realPassword" name="realPassword" type="hidden" />
</div>
</div>
<div class="row">
<div class="box" id="idSpan">
<span class="ti">번호</span>
<span class="box-input view" id="boardId"></span>
</div>
<div class="box">
<span class="ti">작성일</span>
<span class="box-input view" id="regDtm"></span>
</div>
</div>
<div class="row">
<div class="box">
<span class="ti">제목</span>
<span class="box-input view" id="title"></span>
</div>
</div>
<div class="row">
<div class="box">
<span class="box-input box-textarea view" id="content"></span>
</div>
</div>
<div class="comment-box">
<span class="total"></span>
<div class="comment-input">
<textarea placeholder="댓글을 입력해주세요"></textarea>
<button type="button">등록</button>
</div>
<div class="comment-view" id="test3">
<span class="user"><span class="id">익명3</span><span
class="date">05.02 13:00</span></span> <span class="text" id="text">여기는 댓글
정보3333!</span>
<!-- ** -->
<!-- <div class="reply-box"> -->
<!-- <button type="button">답글</button> -->
<!-- <div class="reply-input"> -->
<!-- <textarea placeholder="댓글을 입력해주세요"></textarea> -->
<!-- <button type="button">등록</button> -->
<!-- </div> -->
<!-- <div class="reply-view"> -->
<!-- <span class="user"><span class="id">익명4</span><span -->
<!-- class="date">05.02 13:00</span></span> <span class="text">여기는 댓글의 -->
<!-- 댓글(답글)정보!</span> -->
<!-- </div> -->
<!-- <div class="reply-view"> -->
<!-- <span class="user"><span class="id">익명5</span><span -->
<!-- class="date">05.02 13:00</span></span> <span class="text">여기는 댓글의 -->
<!-- 댓글(답글)정보!2222</span> -->
<!-- </div> -->
<!-- <div class="reply-view"> -->
<!-- <span class="user"><span class="id">익명6</span><span -->
<!-- class="date">05.02 13:00</span></span> <span class="text">여기는 댓글의 -->
<!-- 댓글(답글)정보!3333</span> -->
<!-- </div> -->
<!-- </div> -->
<!-- ** -->
</div>
</div>
<div class="page-link" id="page-link">
<!-- <a id="prev">▲ 이전글<span class="page-link-ti">날씨가 좋네요.</span></a> -->
<!-- <a href="#none">▼ 다음글<span class="page-link-ti">덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다</span></a> -->
</div>
<div class="btn-box">
<a href="/view/jh/board/list/1" class="btn gray">목록</a>
<a class="btn black" id="modify">수정</a>
<a class="btn gray" id="delete">글삭제</a>
</div>
</div>
</body>
<script type="text/javascript">
$(document).ready(function() {
var boardId = '<%=boardId%>';
callViewData(boardId);
getPrevNextBoard(boardId);
callReply(boardId);
})
/* 글 상세 불러오기 */
function callViewData(boardId) {
$.ajax({
url : "/api/jh/board/detailView/" + boardId,
type : "GET",
dataType : 'JSON',
success : function(response) {
var id = response.id
var password = response.password
var title = response.title
var content = response.content
var regUser = response.regUser
var regDtm = response.regDtm
var updUser = response.updUser
$('#boardId').html(id);
var pw = ""
if (password) {
for (var i = 0; i < password.length; i++) {
pw += "*"
}
}
$('#password').html(pw)
$('input[name=realPassword]').attr('value', password)
$('#title').html(title);
$('#content').html(content);
if (updUser) {
$('#regUser').html(updUser)
} else {
$('#regUser').html(regUser)
}
$('#regDtm').html(regDtm)
}
})
}
/* 이전글 다음글 */
function getPrevNextBoard(boardId) {
$.ajax({
url : "/api/jh/board/boardPrevNext/" + boardId,
type : "GET",
dataType : 'JSON',
success : function(response) {
var next = ""
var prev = ""
var ini = "<a href=/view/jh/board/detailView/"
if (response.length == 2) {
prev = ini + response[0].id + " id='prev'>▲ 이전글<span class='page-link-ti'>" + response[0].title + "</span></a>"
next = ini + response[1].id + " id='next'>▼ 다음글<span class='page-link-ti'>" + response[1].title + "</span></a>"
} else if (boardId < response[0].id) {
next = ini + response[0].id + " id='next'>▼ 다음글<span class='page-link-ti'>" + response[0].title + "</span></a>"
} else if (boardId > response[0].id) {
prev = ini + response[0].id + " id='prev'>▲ 이전글<span class='page-link-ti'>" + response[0].title + "</span></a>"
}
document.getElementById("page-link").innerHTML = prev + next;
}
})
}
/* 댓글 불러오기 아주 엉망진창으로 진행되는중입니다~ */
function callReply(boardId) {
$.ajax({
url: "/api/jh/reply/boardReply/" + boardId,
type: "GET",
dataType: 'JSON',
success: function(response) {
console.log(response)
var commentBox = ""
$.each(response, function(i, item) {
console.log("부모 댓글 인덱스" + i)
console.log(item)
/* comment */
if(item.targetId==0) {
var comment =
"<div class='comment-view' id='user" + (i+1) + "'>" +
"<span class='user'>" +
"<span class='id'>" + item.regUser + "</span>" +
"<span class='date'>" + item.regDate + "</span>" +
"</span>" +
"<span class='text' id='text'>" + item.content + "</span>" +
"</div>"
console.log(comment)
// commentBox += comment;
}
$(".comment-input").after(comment);
console.log("자식댓글")
var replyBox = ""
$.each(item.targetReplys, function(j, it) {
/* 자식이 있을경우에만 살이 붙음 */
console.log(it)
// var boxbox = $('#' + it.targetId);
let rb = $("<div/>"); //class reply-box라고 줘야함... 어케주지......
// $('#test3').append(rb)
var targetId = it.targetId;
$('#user' + (it.targetId)).append(rb)
var reply =
// "<div class='reply-box'>" +
"<div class='reply-view'>" +
"<span class='user'>" +
"<span class='id'>" + it.regUser + "</span>" +
"<span class='date'>" + it.regDate + "</span>" +
"</span>" +
"<span class='text'>" + it.content + "</span>" +
"</div>"
// "</div>"
rb.append(reply);
replyBox += reply;
})
})
// $(".comment-input").after(commentBox);
/* 댓글 개수 */
var count = response.length
$('.total').text('댓글 ' + count);
}
})
}
/* 글 삭제 */
$(document).on("click", "#delete", function() {
var id = $('#idSpan').find('span[id="boardId"]').text();
var password = $('#pwHidden').find('input[id="realPassword"]').val();
var inputPassword = prompt("비밀번호 일치 시 삭제 가능합니다.")
if (!(password == inputPassword)) {
alert("비밀번호가 일치하지 않습니다.")
return;
}
$.ajax({
url : "/api/jh/board/delete/" + id,
type : "DELETE",
dataType : 'TEXT',
success : function(data) {
if (data == '1') {
alert("삭제성공")
location.href = "/view/jh/board/list/1"
}
}
})
})
/* 글 수정 */
$(document).on("click", "#modify", function() {
var id = $('#idSpan').find('span[id="boardId"]').text();
location.href = "/view/jh/board/modify/" + id;
})
</script>
</html>

191
src/main/webapp/WEB-INF/view/jh/board/list.jsp

@ -0,0 +1,191 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!doctype html>
<html lang="ko" xml:lang="ko">
<% //Model로 넘겨받은 객체 불러오는 법ㅠㅠㅠㅠ
String pageNum = (String) request.getAttribute("pageNum");
%>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=0,maximum-scale=10,user-scalable=yes">
<!-- css -->
<link rel="stylesheet" href="/web/css/reset.css">
<link rel="stylesheet" href="/web/css/font.css">
<link rel="stylesheet" href="/web/css/common.css">
<!-- js -->
<script src="/web/js/lib/jquery-3.6.0.min.js"></script>
<!-- ajax/axios -->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.serializeObject/2.0.3/jquery.serializeObject.min.js"></script>
<!-- moment/dayjs -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.3/moment.min.js"></script>
<script src="https://unpkg.com/dayjs@1.8.21/dayjs.min.js"></script>
<title>List-팔네트웍스</title>
<style>
.btn{display: inline-flex;flex-direction: row;justify-content: center;align-items: center;height: 35px;border: 1px solid #ddd;}
</style>
</head>
<body>
<div class="notice">
<div>
<h1>list</h1>
</div>
<div class="table_header">
<!-- <div class="count">총<span>0</span>건</div> -->
<div class="search"><input type="text" placeholder="검색어를 입력하세요."></div>
</div>
<table style="table-layout: fixed">
<thead class="thead">
<tr>
<th width="5%">번호</th>
<th width="70%">제목</th>
<th width="10%">작성일</th>
<th width="15%">글쓴이</th>
</tr>
</thead>
</table>
<div class="">
<div class="page_list" id="page_list">
<!-- <a href="#" class="pg_btn" ><<</a>
<a class="pg_btn" ><</a>
<a class="page_num"></a>
<a class="pg_btn" id="pg_btn">></a>
<a class="pg_btn">>></a> -->
</div>
<div class="">
<a href="/view/jh/board/write" class="btn" >글쓰기</a>
</div>
</div>
</div>
</body>
<script type="text/javascript">
$(document).ready(function(){
var pageNum = '<%=pageNum%>';
pageBtn(pageNum);
getPageList(pageNum);
})
/* 페이지 버튼 생성 */
function pageBtn(pageNum) {
$.ajax({
url: "/api/jh/board/pageHelp",
type: "GET",
dataType: 'JSON',
success: function(response) {
var page_list = $('#page_list');
var maxPageNum = response.maxPageNum;
var boardCount = response.boardCount;
/* 1페이지, 2페이지... 생성 */
let pageNumList = ""
for(var i = 1; i <= maxPageNum; i++) {
let page="";
if(i==pageNum) {
page = "<a href=/view/jh/board/list/" + i + " class='page_num'>" + i + "</a>"
} else {
page = "<a href=/view/jh/board/list/" + i + " class='page_num_un'>" + i + "</a>"
}
pageNumList += page;
}
/* << < > >> 버튼 생성 */
var begin = "<a class='pg_btn' onclick='beginBtn(" + pageNum + "," + maxPageNum + ")'><<</a>"
var prev = "<a class='pg_btn' onclick='prevBtn(" + pageNum + "," + maxPageNum + ")'><</a>"
var next = "<a class='pg_btn' onclick='nextBtn(" + pageNum + "," + maxPageNum + ")'>></a>"
var end = "<a class='pg_btn' onclick='endBtn(" + pageNum + "," + maxPageNum + ")'>>></a>"
document.getElementById("page_list").innerHTML= begin + prev + pageNumList + next + end;
getBoardCount(boardCount, pageNum);
}
})
}
/* 총 게시글 수 */
function getBoardCount(boardCount, pageNum) {
let div = $("<div/>");
var count = $("<span/>").append("총" + boardCount + "건")
div.append(count);
$(".search").before(div);
}
/* 페이지 리스트 불러오기 */
function getPageList(pageNum) {
$.ajax({
url: "/api/jh/board/page/" + pageNum,
type: "GET",
dataType: 'JSON',
success: function(response) {
let tb = $("<tbody/>");
for(var i in response) {
let id = response[i].id
let title = response[i].title
let regUser = response[i].regUser
let regDtm = dayjs(response[i].regDtm).format('YYYY-MM-DD')
let updUser = response[i].updUser
let updDtm = dayjs(response[i].updDtm).format('YYYY-MM-DD')
if(updUser) {
var row=$("<tr/>").append(
'<td>' + id + '</td>' +
'<td><a href=/view/jh/board/detailView/' + id + '>' + title + '</a></td>' +
'<td>' + regDtm + '</td>' +
'<td>' + updUser + '</td>'
)
} else {
var row=$("<tr/>").append(
'<td>' + id + '</td>' +
'<td><a href=/view/jh/board/detailView/' + id + '>' + title + '</a></td>' +
'<td>' + regDtm + '</td>' +
'<td>' + regUser + '</td>'
)
}
tb.append(row)
}
$(".thead").after(tb);
}
})
}
/* << 버튼(begin) 이벤트 */
function beginBtn(pageNum, maxPageNum) {
if(!(pageNum == 1)) {
location.href="/view/jh/board/list/1"
}
}
/* < 버튼(prev) 이벤트 */
function prevBtn(pageNum, maxPageNum) {
if(!(pageNum == 1)) {
location.href="/view/jh/board/list/" + (pageNum -1)
}
}
/* > 버튼(next) 이벤트 */
function nextBtn(pageNum, maxPageNum) {
if(!(pageNum == maxPageNum)) {
location.href="/view/jh/board/list/" + (pageNum +1)
}
}
/* >> 버튼(end) 이벤트 */
function endBtn(pageNum, maxPageNum) {
if(!(pageNum == maxPageNum)) {
location.href="/view/jh/board/list/" + maxPageNum
}
}
</script>
</html>

178
src/main/webapp/WEB-INF/view/jh/board/modify.jsp

@ -0,0 +1,178 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!doctype html>
<html lang="ko" xml:lang="ko">
<% //Model로 넘겨받은 객체 불러오는 법ㅠㅠㅠㅠ
String boardId = (String) request.getAttribute("id");
%>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=0,maximum-scale=10,user-scalable=yes">
<!-- css -->
<link rel="stylesheet" href="/web/css/reset.css">
<link rel="stylesheet" href="/web/css/font.css">
<link rel="stylesheet" href="/web/css/common.css">
<!-- js -->
<script src="/web/js/lib/jquery-3.6.0.min.js"></script>
<!-- ajax/axios -->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.serializeObject/2.0.3/jquery.serializeObject.min.js"></script>
<title>Write-팔네트웍스</title>
<style>
.btn{display: inline-flex;flex-direction: row;justify-content: center;align-items: center;height: 35px;border: 1px solid #ddd;}
</style>
</head>
<body>
<div class="notice" id="boardBox">
<div class="row">
<div class="box">
<span class="ti">글쓴이</span>
<span class="box-input"><input id="regUser" name="regUser" type="text" /></span>
<input id="updUser" name="updUser" type="hidden"/>
</div>
<div class="box">
<span class="ti">비밀번호</span>
<span class="box-input"><input id="password" name="password" type="password" /></span>
<input id="realPassword" name="realPassword" type="hidden"/>
</div>
</div>
<div class="row">
<div class="box">
<span class="ti">번호</span>
<span class="box-input"><input id="id" name="id" type="number" readonly/></span>
</div>
<div class="box">
<span class="ti">작성일</span>
<span class="box-input"><input id="regDtm" name="regDtm" type="text" readonly/></span>
<!-- <input id="updDtm" name="updDtm" type="hidden"/> -->
</div>
</div>
<div class="row">
<div class="box">
<span class="ti">제목</span>
<span class="box-input"><input id="title" name="title" type="text" /></span>
</div>
</div>
<div class="row">
<div class="box">
<span class="box-input box-textarea">
<textarea id="content" name="content" placeholder="내용을 입력해주세요"></textarea>
</span>
</div>
</div>
<div class="btn-box">
<a href="/view/jh/board/list/1" class="btn gray">목록</a>
<a class="btn black" id="modify">수정</a>
</div>
</div>
</body>
<script type="text/javascript">
$(document).ready(function() {
callModifyData();
})
/* 수정할 데이터 불러오기 */
function callModifyData() {
var boardId = '<%=boardId%>';
$.ajax({
url : "/api/jh/board/detailView/" + boardId,
type : "GET",
dataType : 'JSON',
success : function(response) {
var id = response.id
var password = response.password
var title = response.title
var content = response.content
var regUser = response.regUser
var regDtm = response.regDtm
var updUser = response.updUser
$('input[name=id]').attr('value', id)
$('input[name=realPassword]').attr('value', password)
$('input[name=title]').attr('value', title)
$('textarea[name=content]').html(content)
if(updUser) {
$('input[name=regUser]').attr('value', updUser)
} else {
$('input[name=regUser]').attr('value', regUser)
}
$('input[name=regDtm]').attr('value', regDtm)
$('input[name=updUser]').attr('value', updUser)
}
})
}
/* 수정 버튼 클릭 */
$(document).on("click", "#modify", function() {
checkAll();
setModify();
})
/* 유효성 검사 */
function checkAll() {
var boardBox = $('#boardBox');
var regUser = boardBox.find('input#regUser').val();
var password = boardBox.find('input[id="password"]').val();
var title = boardBox.find('input[id="title"]').val();
var content = boardBox.find('textarea[id="content"]').val();
if(regUser == "") {
alert("작성자 명을 입력해주세요.")
return;
} else if(title == "") {
alert("제목을 입력해주세요.")
return;
} else if(content == "") {
alert("내용을 입력해주세요.")
return;
}
}
/* 글 수정 */
function setModify() {
var boardBox = $('#boardBox');
var id = boardBox.find('input[id="id"]').val();
var title = boardBox.find('input[id="title"]').val();
var content = boardBox.find('textarea[id="content"]').val();
var realPassword = boardBox.find('input[id="realPassword"]').val();
var password = boardBox.find('input[id="password"]').val();
var updUser = boardBox.find('input#regUser').val();
if(!(realPassword==password)) {
alert("비밀번호가 일치하지 않습니다.");
return;
}
var obj = {
id: id,
title: title,
content: content,
password: password,
updUser: updUser,
}
$.ajax({
url: "/api/jh/board/modify",
type: "PUT",
data: obj,
dataType: 'JSON',
success: function(data) {
if(data=='1') {
alert("수정성공")
location.href="/view/jh/board/detailView/" + id
}
}
})
}
</script>
</html>

156
src/main/webapp/WEB-INF/view/jh/board/write.jsp

@ -0,0 +1,156 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!doctype html>
<html lang="ko" xml:lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=0,maximum-scale=10,user-scalable=yes">
<!-- css -->
<link rel="stylesheet" href="/web/css/reset.css">
<link rel="stylesheet" href="/web/css/font.css">
<link rel="stylesheet" href="/web/css/common.css">
<!-- js -->
<script src="/web/js/lib/jquery-3.6.0.min.js"></script>
<!-- ajax/axios -->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.serializeObject/2.0.3/jquery.serializeObject.min.js"></script>
<!-- moment/dayjs -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.3/moment.min.js"></script>
<script src="https://unpkg.com/dayjs@1.8.21/dayjs.min.js"></script>
<title>Write-팔네트웍스</title>
<style>
.btn{display: inline-flex;flex-direction: row;justify-content: center;align-items: center;height: 35px;border: 1px solid #ddd;}
</style>
</head>
<body>
<div class="notice" id="boardBox">
<div class="row">
<div class="box">
<span class="ti">글쓴이</span>
<span class="box-input"><input id="regUser" name="regUser" type="text" /></span>
<input id="updUser" name="updUser" type="hidden"/>
</div>
<div class="box">
<span class="ti">비밀번호</span>
<span class="box-input"><input id="password" name="password" type="password" /></span>
</div>
</div>
<div class="row">
<div class="box">
<span class="ti">번호</span>
<span class="box-input"><input id="id" name="id" type="number" readonly/></span>
</div>
<div class="box">
<span class="ti">작성일</span>
<span class="box-input"><input id="regDtm" name="regDtm" type="text" readonly/></span>
<input id="updDtm" name="updDtm" type="hidden"/>
</div>
</div>
<div class="row">
<div class="box">
<span class="ti">제목</span>
<span class="box-input"><input id="title" name="title" type="text" /></span>
</div>
</div>
<div class="row">
<div class="box">
<span class="box-input box-textarea">
<textarea id="content" name="content" placeholder="내용을 입력해주세요"></textarea>
</span>
</div>
</div>
<div class="btn-box">
<a href="/view/jh/board/list/1" class="btn gray">목록</a>
<a class="btn black" id="save">저장</a>
</div>
</div>
</body>
<script type="text/javascript">
$(document).ready(function() {
autoSetting()
})
/* 글번호 / 작성일 자동지정 */
function autoSetting() {
$.ajax({
url : "/api/jh/board/boardMaxId",
type : "GET",
dataType : 'TEXT',
success : function(response) {
var id = parseInt(response) + 1
console.log(id)
$('input[name=id]').attr('value', id)
$('input[name=regDtm]').attr('value', dayjs().format('YYYY-MM-DD'))
}
})
}
/* 저장 버튼 클릭 */
$(document).on("click", "#save", function() {
checkAll();
setBoard();
})
/* 유효성 검사 */
function checkAll() {
var boardBox = $('#boardBox');
var regUser = boardBox.find('input#regUser').val();
var password = boardBox.find('input[id="password"]').val();
var title = boardBox.find('input[id="title"]').val();
var content = boardBox.find('textarea[id="content"]').val();
if(!regUser) {
alert("작성자 명을 입력해주세요.")
return;
} else if(title == "") {
alert("제목을 입력해주세요.")
return;
} else if(content == "") {
alert("내용을 입력해주세요.")
return;
}
}
/* 글 저장 */
function setBoard() {
var boardBox = $('#boardBox');
var id = boardBox.find('input[id="id"]').val();
var title = boardBox.find('input[id="title"]').val();
var content = boardBox.find('textarea[id="content"]').val();
var password = boardBox.find('input[id="password"]').val();
var regUser = boardBox.find('input#regUser').val();
var regDtm = boardBox.find('input[id="regDtm"]').val();
var obj = {
id: id,
title: title,
content: content,
password: password,
regUser: regUser,
regDtm: regDtm,
}
$.ajax({
url : "/api/jh/board/write",
type : "POST",
data : obj,
dataType : 'JSON',
success : function(data) {
if(data == '1') {
alert("작성성공")
location.href="/view/jh/board/list/1"
}
}
})
}
</script>
</html>

182
src/main/webapp/WEB-INF/view/jw/board/detail.jsp

@ -0,0 +1,182 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!doctype html>
<html lang="ko" xml:lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width,initial-scale=1.0,minimum-scale=0,maximum-scale=10,user-scalable=yes">
<!-- css -->
<link rel="stylesheet" href="/web/css/reset.css">
<link rel="stylesheet" href="/web/css/font.css">
<link rel="stylesheet" href="/web/css/common.css">
<!-- js -->
<script src="/web/js/lib/jquery-3.6.0.min.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.serializeObject/2.0.3/jquery.serializeObject.min.js"></script>
<title>글 상세</title>
</head>
<body>
<input type="hidden" id="boardId" value="${id}" />
<div class="notice">
<div class="row">
<div class="box">
<span class="ti">글쓴이</span> <span class="box-input view"
id="regUser"></span> <input id="updUser" name="updUser"
type="hidden" />
</div>
<div class="box" id = "pwhidden">
<span class="ti">비밀번호</span> <span class="box-input view"
id="password"></span> <input id="realPassword" name="realPassword"
type="hidden" />
</div>
</div>
<div class="row">
<div class="box" id="idSpan">
<span class="ti">번호</span> <span class="box-input view" id="id"></span>
</div>
<div class="box">
<span class="ti">작성일</span> <span class="box-input view" id="regDtm"></span>
</div>
</div>
<div class="row">
<div class="box">
<span class="ti">제목</span> <span class="box-input view" id="title"></span>
</div>
</div>
<div class="row">
<div class="box">
<span class="box-input box-textarea view" id="content"></span>
</div>
</div>
<div class="comment-box">
<span class="total">댓글 39</span>
<div class="comment-input">
<textarea placeholder="댓글을 입력해주세요"></textarea>
<button type="button">등록</button>
</div>
<div class="comment-view">
<span class="user"><span class="id">123pal***</span><span
class="date">05.02 13:00</span></span> <span class="text">여기는 댓글
정보!</span>
</div>
<div class="comment-view">
<span class="user"><span class="id">123pal***</span><span
class="date">05.02 13:00</span></span> <span class="text">여기는 댓글
정보!2222</span>
</div>
<div class="comment-view">
<span class="user"><span class="id">123pal***</span><span
class="date">05.02 13:00</span></span> <span class="text">여기는 댓글
정보3333!</span>
<div class="reply-box">
<button type="button">답글</button>
<div class="reply-input">
<textarea placeholder="댓글을 입력해주세요"></textarea>
<button type="btn"align_items:right;>등록</button>
</div>
<div class="reply-view">
<span class="user"><span class="id">123pal***</span><span
class="date">05.02 13:00</span></span> <span class="text">여기는 댓글의
댓글(답글)정보!</span>
</div>
<div class="reply-view">
<span class="user"><span class="id">123pal***</span><span
class="date">05.02 13:00</span></span> <span class="text">여기는 댓글의
댓글(답글)정보!2222</span>
</div>
<div class="reply-view">
<span class="user"><span class="id">123pal***</span><span
class="date">05.02 13:00</span></span> <span class="text">여기는 댓글의
댓글(답글)정보!3333</span>
</div>
</div>
</div>
</div>
<div class="page-link">
<a href="#none">▲ 이전글<span class="page-link-ti">날씨가 좋네요.</span></a> <a
href="#none">▼ 다음글<span class="page-link-ti">덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다</span></a>
</div>
<div class="btn-box">
<button class="btn gray " type="button"
onclick="location.href='/board/list'">목록</button>
<button class="btn black" type="button" id="modify">수정</button>
<button class="btn black" type="button" id="delete">삭제</button>
</div>
</div>
<script>
var boardId = $('#boardId').val();
console.log(boardId)
$.ajax({
url : "/api/jw/board/detail/" + boardId, // 목적지
type : "GET", // HTTP Method
contentType : "application/json; charset=utf-8",
data : $("#Action").serialize(), // 전송 데이터
dataType : 'json', // 전송 데이터 형식
success : function(response) { // 성공 시 실행
var id = response.id;
var password = response.password;
var title = response.title;
var content = response.content;
var regUser = response.regUser;
var regDtm = response.regDtm;
var updUser = response.updUser;
$('#id').html(id);
$('#title').html(title);
$('#content').html(content);
$('#regUser').html(regUser);
$('#updUser').html(updUser);
$('#realPassword').val(password)
console.log(password)
var pw = ""
for (var i = 0; i < password.length; i++) {
pw += "*"
}
$('#password').html(pw);
$('#regDtm').html(regDtm);
},
error : function(er) { //실패 시 실행
alert("실패 원인 : " + er);
}
});
$(document).on("click", "#modify", function() {
location.href = "/view/jw/board/modify/" + boardId;
})
$(document).on(
"click",
"#delete",
function() {
var id = $('#idSpan').find('input[id="id"]').text();
var password = $('#pwhidden').find('input[id="realPassword"]').val();
var inputPassword = prompt("비밀번호 일치 시 삭제 가능합니다.")
console.log(id)
console.log(password)
console.log(inputPassword)
if (!(password == inputPassword)) {
alert("비밀번호가 일치하지 않습니다.")
return;
}
$.ajax({
url : "/api/jw/board/delete/" + boardId,
type : "DELETE",
data : id,
dataType : 'TEXT',
success : function(res) {
alert("삭제성공")
location.href = "/view/jw/board/list/"
}
})
})
</script>
</body>
</html>

94
src/main/webapp/WEB-INF/view/jw/board/list.jsp

@ -0,0 +1,94 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!doctype html>
<html lang="ko" xml:lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=0,maximum-scale=10,user-scalable=yes">
<!-- css -->
<link rel="stylesheet" href="/web/css/reset.css">
<link rel="stylesheet" href="/web/css/font.css">
<link rel="stylesheet" href="/web/css/common.css">
<!-- js -->
<script src="/web/js/lib/jquery-3.6.0.min.js"></script>
<style>
.btn{display: inline-flex;flex-direction: row;justify-content: center;align-items: center;height: 35px;border: 1px solid #ddd;}
</style>
<title>글 목록</title>
</head>
<body>
<div class="notice">
<div class="table_header">
<!-- <div class="">총 <span>0</span>건</div>-->
<div class=""><input type="text" placeholder="검색어를 입력하세요"/></div>
</div>
<table id="boardTable">
<thead>
<tr>
<th>번호</th>
<th>제목</th>
<th>작성일</th>
<th>글쓴이</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="page_list">
<a href="#" class="pg_btn"><<</a>
<a class="pg_btn"><</a>
<a class="page_num">1</a>
<a class="page_num">2</a>
<a class="page_num">3</a>
<a class="page_num">4</a>
<a class="page_num">5</a>
<a class="pg_btn">></a>
<a class="pg_btn">>></a>
</div>
<div class = "btn">
<a class = "btn" href="/view/jw/board/write">글쓰기</a>
</div>
<script>
$(document).ready(function(){
getBoardList();
})
function getBoardList(){
$.get('/api/jw/board/list').done(function(res){
console.log(res);
renderBoardList(res);
}).fail(function(e){
console.log('error', e);
})
}
function renderBoardList(boards){
if(!boards) return;
if(!(boards instanceof Array)) return;
$.each(boards, function(i, board){
console.log(i, board);
var r = '';
r += '<tr>';
r += '<td>'+board.id+'</td>';
r += '<td class="title">'+board.title+'</td>';
r += '<td>'+board.regDtm+'</td>';
r += '<td>'+board.regUser+'</td>';
r += '</tr>';
var $el = $(r);
$el.find('.title').click(function(e){
location.href='/view/jw/board/detail/'+board.id;
});
$('#boardTable tbody').append($el);
})
}
</script>
</body>
</html>

181
src/main/webapp/WEB-INF/view/jw/board/modify.jsp

@ -0,0 +1,181 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=0, maximum-scale=10, user-scalable=yes">
<link rel="stylesheet" href="/web/css/reset.css">
<link rel="stylesheet" href="/web/css/font.css">
<link rel="stylesheet" href="/web/css/common.css">
<!-- js -->
<script src="/web/js/lib/jquery-3.6.0.min.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.serializeObject/2.0.3/jquery.serializeObject.min.js"></script>
</head>
<body>
<form id="action">
<input type="hidden" id="boardId" value="${id}" />
<div class="notice" id="boardBox">
<div class="row">
<div class="box">
<span class="ti">글쓴이</span> <span class="box-input"><input
id="regUser" name="regUser" type="text" /></span> <input id="updUser"
name="updUser" type="hidden" />
</div>
<div class="box">
<span class="ti">비밀번호</span> <span class="box-input"><input
id="password" name="password" type="password" /></span> <input
id="realPassword" name="realPassword" type="hidden" />
</div>
</div>
<div class="row">
<div class="box">
<span class="ti">번호</span> <span class="box-input"><input
id="id" name="id" type="number" readonly /></span>
</div>
<div class="box">
<span class="ti">작성일</span> <span class="box-input"><input
id="regDtm" name="regDtm" type="text" readonly /></span> <input
id="updDtm" name="updDtm" type="hidden" />
</div>
</div>
<div class="row">
<div class="box">
<span class="ti">제목</span> <span class="box-input"><input
id="title" name="title" type="text" /></span>
</div>
</div>
<div class="row">
<div class="box">
<span class="box-input box-textarea"> <textarea id="content"
name="content" placeholder="내용을 입력해주세요"></textarea>
</span>
</div>
</div>
<div class="btn-box">
<a href="/board/list" class="btn gray">목록</a> <a class="btn black"
id="submit">수정</a>
</div>
</div>
</form>
</body>
<script type="text/javascript">
var boardId = $('#boardId').val();
$(document).ready(function() {
initLoad();
setEvent();
})
// 초기 데이터 로드
function initLoad() {
$.ajax({
url : "/api/jw/board/detail/" + boardId,
type : "GET",
contentType : "application/json; charset=utf-8",
dataType : 'json',
success : function(res) {
var id = res.id;
var password = res.password
var title = res.title
var content = res.content
var regUser = res.regUser
var regDtm = res.regDtm
var updUser = res.updUser
var updDtm = res.updDtm
console.log(id);
$('input[name=id]').attr('value', id)
$('input[name=realPassword]').attr('value', password)
$('input[name=title]').attr('value', title)
$('textarea[name=content]').html(content)
if (updUser) {
$('input[name=regUser]').attr('value', updUser)
} else {
$('input[name=regUser]').attr('value', regUser)
}
$('input[name=regDtm]').attr('value', regDtm)
$('input[name=updUser]').attr('value', updUser)
$('input[name=updDtm]').attr('value', updDtm)
}
})
}
// 이벤트 초기화
function setEvent() {
// ?
$(document).on("click", "#modify", function() {
checkAll();
});
// 수정 btn 클릭 이벤트
$("#submit").on('click', function() {
var data = setModify();
/*
$.each($("#action").serializeArray(), function(i, item) {
data[item.name] = item.value
})
*/
// console.log(data)
// if (!data || !(data instanceof Object)) {
// // alert('입력 파라미터가 잘못되었습니다.')
// return;
// }
data = JSON.stringify(data);
$.ajax({
url : "/api/jw/board/modify/" + boardId,
type : "PUT",
contentType : "application/json; charset=utf-8",
data : data,
dataType : 'JSON',
success : function(res) {
console.log(res)
alert("수정성공")
location.href = "/view/jw/board/detail/" + boardId
}
})
})
}
// form 데이터 -> object
function setModify() {
var boardBox = $('#action');
var id = boardBox.find('input[id="id"]').val();
var title = boardBox.find('input[id="title"]').val();
var content = boardBox.find('textarea[id="content"]').val();
var realPassword = boardBox.find('input[id="realPassword"]').val();
var password = boardBox.find('input[id="password"]').val();
var updUser = boardBox.find('input[id="regUser"]').val();
//var updDtm = boardBox.find('input[id="regDtm"]').val();
console.log(realPassword)
console.log(password)
if (!(realPassword == password)) {
alert("비밀번호가 일치하지 않습니다.");
return;
}
var obj = {
id : id,
title : title,
content : content,
password : password,
updUser : updUser,
//updDtm: updDtm
}
return obj;
}
</script>
</html>

134
src/main/webapp/WEB-INF/view/jw/board/write.jsp

@ -0,0 +1,134 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=0, maximum-scale=10, user-scalable=yes">
<link rel="stylesheet" href="/web/css/reset.css">
<link rel="stylesheet" href="/web/css/font.css">
<link rel="stylesheet" href="/web/css/common.css">
<!-- js -->
<script src="/web/js/lib/jquery-3.6.0.min.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.serializeObject/2.0.3/jquery.serializeObject.min.js"></script>
</head>
<body>
<form id="Action">
<div class="notice" id="boardBox">
<div class="row">
<div class="box">
<span class="ti">글쓴이</span> <span class="box-input"><input
id="regUser" name="regUser" type="text" /></span> <input id="updUser"
name="updUser" type="hidden" />
</div>
<div class="box">
<span class="ti">비밀번호</span> <span class="box-input"><input
id="password" name="password" type="password" /></span>
</div>
</div>
<div class="row">
<div class="box">
<span class="ti">번호</span> <span class="box-input"><input
id="id" name="id" type="number" readonly /></span>
</div>
<div class="box">
<span class="ti">작성일</span> <span class="box-input"><input
id="regDtm" name="regDtm" type="text" readonly /></span> <input
id="updDtm" name="updDtm" type="hidden" />
</div>
</div>
<div class="row">
<div class="box">
<span class="ti">제목</span> <span class="box-input"><input
id="title" name="title" type="text" /></span>
</div>
</div>
<div class="row">
<div class="box">
<span class="box-input box-textarea"> <textarea id="content"
name="content" placeholder="내용을 입력해주세요"></textarea>
</span>
</div>
</div>
<div class="btn-box">
<a href="/board/list" class="btn gray">목록</a> <a class="btn black"
id="submit">작성</a>
</div>
</div>
</form>
<script>
$(document).ready(function() {
$("#submit").on('click', function() { // 제출 버튼 이벤트 지정
var data = {}
$.each($("#Action").serializeArray(), function(i, item){
data[item.name] = item.value
})
console.log(data)
data = JSON.stringify(data);
console.log(data)
$.ajax({
url : "/api/jw/board/post", // 목적지
type : "POST", // HTTP Method
contentType: "application/json; charset=utf-8",
// data : $("#Action").serialize(), // 전송 데이터
data : data, // 전송 데이터
dataType : 'json', // 전송 데이터 형식
success : function(res) { // 성공 시 실행
alert("성공");
location.href="/view/jw/board/list"
},
error : function(er) { //실패 시 실행
alert("실패 원인 : " + er);
}
});
});
});
$(document).ready(function() {
// $.ajax({
// url : "/api/jw/board/index",
// type : "GET",
// contentType: "application/json; charset=utf-8",
// data : {},
// dataType : 'json',
// success : function(res) {
// var id = parseInt(res) +1
// $('input[name=id]').attr('value', id)
// }
// })
})
$(document).on("click", "#submit", function() {
checkAll();
})
function checkAll() {
var boardBox = $('#Action');
var regUser = boardBox.find('input#regUser').val();
var password = boardBox.find('input[id="password"]').val();
var title = boardBox.find('input[id="title"]').val();
var content = boardBox.find('textarea[id="content"]').val();
if(regUser == "") {
alert("작성자 명을 입력해주세요.")
return;
} else if(title == "") {
alert("제목을 입력해주세요.")
return;
} else if(content == "") {
alert("내용을 입력해주세요.")
return;
}
setModify();
}
</script>
</body>
</html>

11
src/main/webapp/WEB-INF/view/main.jsp

@ -0,0 +1,11 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Main</title>
</head>
<body>
board main
</body>
</html>

124
src/main/webapp/WEB-INF/view/sample/board/detail.jsp

@ -0,0 +1,124 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!doctype html>
<html lang="ko" xml:lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=0,maximum-scale=10,user-scalable=yes">
<!-- css -->
<link rel="stylesheet" href="/web/css/reset.css">
<link rel="stylesheet" href="/web/css/font.css">
<link rel="stylesheet" href="/web/css/common.css">
<!-- js -->
<script src="/web/js/lib/jquery-3.6.0.min.js"></script>
<title>View-팔네트웍스</title>
</head>
<body>
<input type="hidden" id="boardId" value="${boardId}"/>
<div class="notice">
<div class="row">
<div class="box">
<span class="ti">글쓴이</span>
<span class="box-input view" id="regUser"></span>
</div>
<div class="box">
<span class="ti">비밀번호</span>
<span class="box-input view" id="password"></span>
</div>
</div>
<div class="row">
<div class="box">
<span class="ti">번호</span>
<span class="box-input view" id="num">20</span>
</div>
<div class="box">
<span class="ti">작성일</span>
<span class="box-input view" id="regDtm">2022/05/02</span>
</div>
</div>
<div class="row">
<div class="box">
<span class="ti">제목</span>
<span class="box-input view" id="title">다리가 아파요</span>
</div>
</div>
<div class="row">
<div class="box">
<span class="box-input box-textarea view" id="content">
반깁스 너무 불편하네요.
</span>
</div>
</div>
<div class="comment-box">
<span class="total">댓글 39</span>
<div class="comment-input">
<textarea placeholder="댓글을 입력해주세요"></textarea>
<button type="button">등록</button>
</div>
<div class="comment-view">
<span class="user"><span class="id">123pal***</span><span class="date">05.02 13:00</span></span>
<span class="text">여기는 댓글 정보!</span>
</div>
<div class="comment-view">
<span class="user"><span class="id">123pal***</span><span class="date">05.02 13:00</span></span>
<span class="text">여기는 댓글 정보!2222</span>
</div>
<div class="comment-view">
<span class="user"><span class="id">123pal***</span><span class="date">05.02 13:00</span></span>
<span class="text">여기는 댓글 정보3333!</span>
<div class="reply-box">
<button type="button">답글</button>
<div class="reply-input">
<textarea placeholder="댓글을 입력해주세요"></textarea>
<button type="button">등록</button>
</div>
<div class="reply-view">
<span class="user"><span class="id">123pal***</span><span class="date">05.02 13:00</span></span>
<span class="text">여기는 댓글의 댓글(답글)정보!</span>
</div>
<div class="reply-view">
<span class="user"><span class="id">123pal***</span><span class="date">05.02 13:00</span></span>
<span class="text">여기는 댓글의 댓글(답글)정보!2222</span>
</div>
<div class="reply-view">
<span class="user"><span class="id">123pal***</span><span class="date">05.02 13:00</span></span>
<span class="text">여기는 댓글의 댓글(답글)정보!3333</span>
</div>
</div>
</div>
</div>
<div class="page-link">
<a href="#none">▲ 이전글<span class="page-link-ti">날씨가 좋네요.</span></a>
<a href="#none">▼ 다음글<span class="page-link-ti">덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다덥다</span></a>
</div>
<div class="btn-box">
<button class="btn gray" type="button">목록</button>
<button class="btn black" type="button">저장</button>
</div>
</div>
<script>
$(document).ready(function(){
var id = $('#boardId').val();
if(id){
$.get('/api/sample/board/detail/'+id).done((res) => {
$('#num').html(res.id);
$('#password').html(res.password);
$('#regDtm').html(res.regDtm);
$('#regUser').html(res.regUser);
$('#title').html(res.title);
$('#content').html(res.content);
}).fail((e) => {
console.log('error', e);
});
}
});
</script>
</body>
</html>

88
src/main/webapp/WEB-INF/view/sample/board/list.jsp

@ -0,0 +1,88 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!doctype html>
<html lang="ko" xml:lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=0,maximum-scale=10,user-scalable=yes">
<!-- css -->
<link rel="stylesheet" href="/web/css/reset.css">
<link rel="stylesheet" href="/web/css/font.css">
<link rel="stylesheet" href="/web/css/common.css">
<!-- js -->
<script src="/web/js/lib/jquery-3.6.0.min.js"></script>
<title>List-팔네트웍스</title>
</head>
<body>
<div class="notice">
<div class="table_header">
<div class="">총 <span>0</span>건</div>
<div class=""><input type="text" placeholder="검색어를 입력하세요"/></div>
</div>
<table id="boardTable">
<thead>
<tr>
<th>번호</th>
<th>제목</th>
<th>작성일</th>
<th>글쓴이</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="page_list">
<a href="#" class="pg_btn"><<</a>
<a class="pg_btn"><</a>
<a class="page_num">1</a>
<a class="page_num">2</a>
<a class="page_num">3</a>
<a class="page_num">4</a>
<a class="page_num">5</a>
<a class="pg_btn">></a>
<a class="pg_btn">>></a>
</div>
</div>
<script>
$(document).ready(function(){
getBoardList();
})
function getBoardList(){
$.get('/api/sample/board/list').done(function(res){
console.log(res);
renderBoardList(res);
}).fail(function(e){
console.log('error', e);
})
}
function renderBoardList(boards){
if(!boards) return;
if(!(boards instanceof Array)) return;
$.each(boards, function(i, board){
console.log(i, board);
var r = '';
r += '<tr>';
r += '<td>'+board.id+'</td>';
r += '<td class="title">'+board.title+'</td>';
r += '<td>'+board.regDtm+'</td>';
r += '<td>'+board.regUser+'</td>';
r += '</tr>';
var $el = $(r);
$el.find('.title').click(function(e){
console.log(board.id);
location.href='/view/sample/board/detail/'+board.id;
});
$('#boardTable tbody').append($el);
})
}
</script>
</body>
</html>

61
src/main/webapp/web/css/common.css

@ -0,0 +1,61 @@
@charset "utf-8";
.notice{max-width:1280px;margin:100px auto;}
table{width:100%;}
table tr th{background:#f4f4f4;}
table tr th, table tr td{padding:12px 10px;text-align:center;border:1px solid #ddd;}
table tbody tr td:nth-child(1){}
table tbody tr td:nth-child(2){text-overflow: ellipsis;white-space: nowrap;overflow: hidden;max-width:700px;}
.page_list{display: flex;align-items: center;justify-content: flex-start;padding:40px 0;}
.page_list a{display:inline-flex;flex-direction:row;justify-content: center;align-items: center;width:35px;height:35px;border:1px solid #ddd;}
.page_list a.page_num{border:0; text-decoration: underline;}
.page_list a.page_num_un{border:0;}
.pg_btn + .pg_btn{margin-left:10px;}
.table_header{display:flex; justify-content: space-between;margin-bottom:20px;}
.notice input{border:1px solid #ddd;}
.row{display:flex;}
.row + .row{margin-top:-1px;}
.row .box{flex:1;display:flex;align-items: center;border:1px solid #ccc;}
.row .box + .box{border-left:0;}
.ti{width:150px;height:60px;background:#f4f4f4;border-right:1px solid #ddd;display:flex;align-items: center;justify-content: center;text-align: center;font-weight:500;}
.box-input{width:calc(100% - 150px);padding:0 20px;}
.box-input input{min-height:40px;width:100%;padding:0 10px;font-size:1rem;}
.box-input.box-textarea{padding:20px 20px 16px 20px;width:100%;}
.box-input.view{cursor:default;}
.box-textarea textarea{border:0;resize:none;width:100%;height:250px;font-size:1rem;border:1px solid #fff;}
nput[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0;}
input:focus{outline:0;border:1px solid #cc9eff;}
textarea:focus{outline:0;border:0;}
button{background:none;border:0;background:#fff;}
button:hover{cursor:pointer;}
.btn-box{display:flex;justify-content: center;margin:40px 0;}
.btn-box .btn + .btn{margin-left:20px;}
.btn{display:flex;align-items: center;justify-content: center;text-align: center;width:150px;height:50px;font-size:1rem;}
.btn.gray{background:#ddd;}
.btn.black{background:#333;color:#fff;}
.page-link{display:flex;flex-direction: column;margin:0 0 40px 0;border-top:1px solid #ddd;padding-top:20px;}
.page-link a + a{margin-top:20px;}
.page-link a{display: flex;align-items: center;border-bottom:1px solid #ddd;padding-bottom:20px;}
.page-link a span{margin-left:40px;max-width: 1000px;display: inline-block;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}
.page-link a span:hover{text-decoration: underline;}
.comment-box{margin-top:40px;font-size:0.875rem;}
.comment-box .total{font-weight:600;}
.comment-input{display:flex;justify-content:space-between;margin-top:10px;}
.comment-input textarea{border:0;resize:none;width:calc(100% - 130px);height:100px;border:1px solid #333;border-radius:4px;padding:14px;}
.comment-input button{width:120px;height:100px;background:#333;color:#fff;font-weight:500;border-radius:4px;}
.comment-view{border-top:1px solid #ddd;padding-bottom:20px;}
.comment-view .user, .comment-view .text{display:block;}
.comment-view .user{margin:20px 0 10px 0;}
.comment-view .user span.id{font-weight:500;color:#a917d9;}
.comment-view .user span.date{font-size:0.75rem;}
.comment-view .user span{display: inline-block;position: relative;}
.comment-view .user span + span::before {content: '';width: 1px;height: 12px;background-color: #cbcbcb;display: inline-block;margin: 0 10px;}
.reply-box > button{border:1px solid #ddd;margin-top:10px;}
.reply-input{display:flex;justify-content:space-between;margin-top:10px;}
.reply-input textarea{border:0;resize:none;width:calc(100% - 130px);height:42px;border:1px solid #999;border-radius:4px;padding:10px;}
.reply-input button{width:120px;height:42px;background:#333;color:#fff;font-weight:500;border-radius:4px;}
.reply-view{background:#f4f4f4;padding:14px;border-radius:4px;margin:14px 10px 0 10px;}
.reply-view .user{margin:0 0 10px 0;}

101
src/main/webapp/web/css/font.css

@ -0,0 +1,101 @@
@charset "utf-8";
/* 에스코어드림 */
@font-face {
font-family: 'score';
font-style: normal;
font-weight: 100;
src:url('font/S-CoreDream-1Thin.eot');
src:url('font/S-CoreDream-1Thin.eot?#iefix') format('embedded-opentype'),
url('font/S-CoreDream-1Thin.woff') format('woff'),
url('font/S-CoreDream-1Thin.woff2') format('woff2'),
url('font/S-CoreDream-1Thin.ttf') format('truetype');
}
@font-face {
font-family: 'score';
font-style: normal;
font-weight: 200;
src:url('font/S-CoreDream-2ExtraLight.eot');
src:url('font/S-CoreDream-2ExtraLight.eot?#iefix') format('embedded-opentype'),
url('font/S-CoreDream-2ExtraLight.woff') format('woff'),
url('font/S-CoreDream-2ExtraLight.woff2') format('woff2'),
url('font/S-CoreDream-2ExtraLight.ttf') format('truetype');
}
@font-face {
font-family: 'score';
font-style: normal;
font-weight: 300;
src:url('font/S-CoreDream-3Light.eot');
src:url('font/S-CoreDream-3Light.eot?#iefix') format('embedded-opentype'),
url('font/S-CoreDream-3Light.woff') format('woff'),
url('font/S-CoreDream-3Light.woff2') format('woff2'),
url('font/S-CoreDream-3Light.ttf') format('truetype');
}
@font-face {
font-family: 'score';
font-style: normal;
font-weight: 400;
src:url('font/S-CoreDream-4Regular.eot');
src:url('font/S-CoreDream-4Regular.eot?#iefix') format('embedded-opentype'),
url('font/S-CoreDream-4Regular.woff') format('woff'),
url('font/S-CoreDream-4Regular.woff2') format('woff2'),
url('font/S-CoreDream-4Regular.ttf') format('truetype');
}
@font-face {
font-family: 'score';
font-style: normal;
font-weight: 500;
src:url('font/S-CoreDream-5Medium.eot');
src:url('font/S-CoreDream-5Medium.eot?#iefix') format('embedded-opentype'),
url('font/S-CoreDream-5Medium.woff') format('woff'),
url('font/S-CoreDream-5Medium.woff2') format('woff2'),
url('font/S-CoreDream-5Medium.ttf') format('truetype');
}
@font-face {
font-family: 'score';
font-style: normal;
font-weight: 600;
src:url('font/S-CoreDream-6Bold.eot');
src:url('font/S-CoreDream-6Bold.eot?#iefix') format('embedded-opentype'),
url('font/S-CoreDream-6Bold.woff') format('woff'),
url('font/S-CoreDream-6Bold.woff2') format('woff2'),
url('font/S-CoreDream-6Bold.ttf') format('truetype');
}
@font-face {
font-family: 'score';
font-style: normal;
font-weight: 700;
src:url('font/S-CoreDream-7ExtraBold.eot');
src:url('font/S-CoreDream-7ExtraBold.eot?#iefix') format('embedded-opentype'),
url('font/S-CoreDream-7ExtraBold.woff') format('woff'),
url('font/S-CoreDream-7ExtraBold.woff2') format('woff2'),
url('font/S-CoreDream-7ExtraBold.ttf') format('truetype');
}
@font-face {
font-family: 'score';
font-style: normal;
font-weight: 800;
src:url('font/S-CoreDream-8Heavy.eot');
src:url('font/S-CoreDream-8Heavy.eot?#iefix') format('embedded-opentype'),
url('font/S-CoreDream-8Heavy.woff') format('woff'),
url('font/S-CoreDream-8Heavy.woff2') format('woff2'),
url('font/S-CoreDream-8Heavy.ttf') format('truetype');
}
@font-face {
font-family: 'score';
font-style: normal;
font-weight: 900;
src:url('font/S-CoreDream-9Black.eot');
src:url('font/S-CoreDream-9Black.eot?#iefix') format('embedded-opentype'),
url('font/S-CoreDream-9Black.woff') format('woff'),
url('font/S-CoreDream-9Black.woff2') format('woff2'),
url('font/S-CoreDream-9Black.ttf') format('truetype');
}

BIN
src/main/webapp/web/css/font/NotoSansKR-Black.otf

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Black.woff

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Black.woff2

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Bold.otf

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Bold.woff

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Bold.woff2

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Light.otf

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Light.woff

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Light.woff2

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Medium.otf

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Medium.woff

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Medium.woff2

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Regular.otf

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Regular.woff

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Regular.woff2

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Thin.otf

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Thin.woff

Binary file not shown.

BIN
src/main/webapp/web/css/font/NotoSansKR-Thin.woff2

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-1Thin.eot

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-1Thin.ttf

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-1Thin.woff

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-1Thin.woff2

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-2ExtraLight.eot

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-2ExtraLight.ttf

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-2ExtraLight.woff

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-2ExtraLight.woff2

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-3Light.eot

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-3Light.ttf

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-3Light.woff

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-3Light.woff2

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-4Regular.eot

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-4Regular.ttf

Binary file not shown.

BIN
src/main/webapp/web/css/font/S-CoreDream-4Regular.woff

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save