commit 9ae29cb66e00a56244af08183d97cd6b34881cd0 Author: SeoJin Kim Date: Fri Aug 7 23:21:28 2020 +0900 mvc프로젝트 생성 및 자버 버전&스프링 버전 변경 -pom.xml 버전변경 -3.1.1 => 5.0.7 -1.6 => 1.8 diff --git a/VamPa/.gitignore b/VamPa/.gitignore new file mode 100644 index 0000000..97d5c0f --- /dev/null +++ b/VamPa/.gitignore @@ -0,0 +1,125 @@ + +# Created by https://www.gitignore.io/api/java,windows,eclipse +# Edit at https://www.gitignore.io/?templates=java,windows,eclipse + +### Eclipse ### +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# 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/ + +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet + +### Eclipse Patch ### +# Eclipse Core +.project + +# JDT-specific (Eclipse Java Development Tools) +.classpath + +# Annotation Processing +.apt_generated + +.sts4-cache/ + +### Java ### +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +### 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.gitignore.io/api/java,windows,eclipse \ No newline at end of file diff --git a/VamPa/Blog_Project/VamPa/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF b/VamPa/Blog_Project/VamPa/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000..d45f412 --- /dev/null +++ b/VamPa/Blog_Project/VamPa/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF @@ -0,0 +1,5 @@ +Manifest-Version: 1.0 +Built-By: sjinj +Build-Jdk: 1.8.0_221 +Created-By: Maven Integration for Eclipse + diff --git a/VamPa/Blog_Project/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties b/VamPa/Blog_Project/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties new file mode 100644 index 0000000..c69192b --- /dev/null +++ b/VamPa/Blog_Project/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties @@ -0,0 +1,7 @@ +#Generated by Maven Integration for Eclipse +#Fri Aug 07 23:18:00 KST 2020 +version=1.0.0-BUILD-SNAPSHOT +groupId=com.vam +m2e.projectName=VamPa +m2e.projectLocation=C\:\\Users\\sjinj\\git\\blog_project\\VamPa +artifactId=controller diff --git a/VamPa/Blog_Project/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml b/VamPa/Blog_Project/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml new file mode 100644 index 0000000..b0d5e8e --- /dev/null +++ b/VamPa/Blog_Project/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml @@ -0,0 +1,158 @@ + + + 4.0.0 + com.vam + controller + VamPa + war + 1.0.0-BUILD-SNAPSHOT + + 1.8 + 5.0.7.RELEASE + 1.6.10 + 1.6.6 + + + + + org.springframework + spring-context + ${org.springframework-version} + + + + commons-logging + commons-logging + + + + + org.springframework + spring-webmvc + ${org.springframework-version} + + + + + org.aspectj + aspectjrt + ${org.aspectj-version} + + + + + org.slf4j + slf4j-api + ${org.slf4j-version} + + + org.slf4j + jcl-over-slf4j + ${org.slf4j-version} + runtime + + + org.slf4j + slf4j-log4j12 + ${org.slf4j-version} + runtime + + + log4j + log4j + 1.2.15 + + + javax.mail + mail + + + javax.jms + jms + + + com.sun.jdmk + jmxtools + + + com.sun.jmx + jmxri + + + runtime + + + + + javax.inject + javax.inject + 1 + + + + + javax.servlet + servlet-api + 2.5 + provided + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + javax.servlet + jstl + 1.2 + + + + + junit + junit + 4.7 + test + + + + + + maven-eclipse-plugin + 2.9 + + + org.springframework.ide.eclipse.core.springnature + + + org.springframework.ide.eclipse.core.springbuilder + + true + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + -Xlint:all + true + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + org.test.int1.Main + + + + + diff --git a/VamPa/pom.xml b/VamPa/pom.xml new file mode 100644 index 0000000..b0d5e8e --- /dev/null +++ b/VamPa/pom.xml @@ -0,0 +1,158 @@ + + + 4.0.0 + com.vam + controller + VamPa + war + 1.0.0-BUILD-SNAPSHOT + + 1.8 + 5.0.7.RELEASE + 1.6.10 + 1.6.6 + + + + + org.springframework + spring-context + ${org.springframework-version} + + + + commons-logging + commons-logging + + + + + org.springframework + spring-webmvc + ${org.springframework-version} + + + + + org.aspectj + aspectjrt + ${org.aspectj-version} + + + + + org.slf4j + slf4j-api + ${org.slf4j-version} + + + org.slf4j + jcl-over-slf4j + ${org.slf4j-version} + runtime + + + org.slf4j + slf4j-log4j12 + ${org.slf4j-version} + runtime + + + log4j + log4j + 1.2.15 + + + javax.mail + mail + + + javax.jms + jms + + + com.sun.jdmk + jmxtools + + + com.sun.jmx + jmxri + + + runtime + + + + + javax.inject + javax.inject + 1 + + + + + javax.servlet + servlet-api + 2.5 + provided + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + javax.servlet + jstl + 1.2 + + + + + junit + junit + 4.7 + test + + + + + + maven-eclipse-plugin + 2.9 + + + org.springframework.ide.eclipse.core.springnature + + + org.springframework.ide.eclipse.core.springbuilder + + true + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + -Xlint:all + true + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + org.test.int1.Main + + + + + diff --git a/VamPa/src/main/java/com/vam/controller/HomeController.java b/VamPa/src/main/java/com/vam/controller/HomeController.java new file mode 100644 index 0000000..87a0d02 --- /dev/null +++ b/VamPa/src/main/java/com/vam/controller/HomeController.java @@ -0,0 +1,39 @@ +package com.vam.controller; + +import java.text.DateFormat; +import java.util.Date; +import java.util.Locale; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * Handles requests for the application home page. + */ +@Controller +public class HomeController { + + private static final Logger logger = LoggerFactory.getLogger(HomeController.class); + + /** + * Simply selects the home view to render by returning its name. + */ + @RequestMapping(value = "/", method = RequestMethod.GET) + public String home(Locale locale, Model model) { + logger.info("Welcome home! The client locale is {}.", locale); + + Date date = new Date(); + DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); + + String formattedDate = dateFormat.format(date); + + model.addAttribute("serverTime", formattedDate ); + + return "home"; + } + +} diff --git a/VamPa/src/main/resources/log4j.xml b/VamPa/src/main/resources/log4j.xml new file mode 100644 index 0000000..24be56d --- /dev/null +++ b/VamPa/src/main/resources/log4j.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/VamPa/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml b/VamPa/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml new file mode 100644 index 0000000..10166d1 --- /dev/null +++ b/VamPa/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/VamPa/src/main/webapp/WEB-INF/spring/root-context.xml b/VamPa/src/main/webapp/WEB-INF/spring/root-context.xml new file mode 100644 index 0000000..e071144 --- /dev/null +++ b/VamPa/src/main/webapp/WEB-INF/spring/root-context.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/VamPa/src/main/webapp/WEB-INF/views/home.jsp b/VamPa/src/main/webapp/WEB-INF/views/home.jsp new file mode 100644 index 0000000..4783383 --- /dev/null +++ b/VamPa/src/main/webapp/WEB-INF/views/home.jsp @@ -0,0 +1,14 @@ +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ page session="false" %> + + + Home + + +

+ Hello world! +

+ +

The time on the server is ${serverTime}.

+ + diff --git a/VamPa/src/main/webapp/WEB-INF/web.xml b/VamPa/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..c9975d5 --- /dev/null +++ b/VamPa/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,33 @@ + + + + + + contextConfigLocation + /WEB-INF/spring/root-context.xml + + + + + org.springframework.web.context.ContextLoaderListener + + + + + appServlet + org.springframework.web.servlet.DispatcherServlet + + contextConfigLocation + /WEB-INF/spring/appServlet/servlet-context.xml + + 1 + + + + appServlet + / + + + diff --git a/VamPa/src/test/resources/log4j.xml b/VamPa/src/test/resources/log4j.xml new file mode 100644 index 0000000..7906a76 --- /dev/null +++ b/VamPa/src/test/resources/log4j.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/VamPa/target/classes/log4j.xml b/VamPa/target/classes/log4j.xml new file mode 100644 index 0000000..24be56d --- /dev/null +++ b/VamPa/target/classes/log4j.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/VamPa/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF b/VamPa/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000..d45f412 --- /dev/null +++ b/VamPa/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF @@ -0,0 +1,5 @@ +Manifest-Version: 1.0 +Built-By: sjinj +Build-Jdk: 1.8.0_221 +Created-By: Maven Integration for Eclipse + diff --git a/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties b/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties new file mode 100644 index 0000000..650a469 --- /dev/null +++ b/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties @@ -0,0 +1,7 @@ +#Generated by Maven Integration for Eclipse +#Fri Aug 07 23:14:14 KST 2020 +version=1.0.0-BUILD-SNAPSHOT +groupId=com.vam +m2e.projectName=VamPa +m2e.projectLocation=D\:\\Blog_Project\\VamPa +artifactId=controller diff --git a/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml b/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml new file mode 100644 index 0000000..b0d5e8e --- /dev/null +++ b/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml @@ -0,0 +1,158 @@ + + + 4.0.0 + com.vam + controller + VamPa + war + 1.0.0-BUILD-SNAPSHOT + + 1.8 + 5.0.7.RELEASE + 1.6.10 + 1.6.6 + + + + + org.springframework + spring-context + ${org.springframework-version} + + + + commons-logging + commons-logging + + + + + org.springframework + spring-webmvc + ${org.springframework-version} + + + + + org.aspectj + aspectjrt + ${org.aspectj-version} + + + + + org.slf4j + slf4j-api + ${org.slf4j-version} + + + org.slf4j + jcl-over-slf4j + ${org.slf4j-version} + runtime + + + org.slf4j + slf4j-log4j12 + ${org.slf4j-version} + runtime + + + log4j + log4j + 1.2.15 + + + javax.mail + mail + + + javax.jms + jms + + + com.sun.jdmk + jmxtools + + + com.sun.jmx + jmxri + + + runtime + + + + + javax.inject + javax.inject + 1 + + + + + javax.servlet + servlet-api + 2.5 + provided + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + javax.servlet + jstl + 1.2 + + + + + junit + junit + 4.7 + test + + + + + + maven-eclipse-plugin + 2.9 + + + org.springframework.ide.eclipse.core.springnature + + + org.springframework.ide.eclipse.core.springbuilder + + true + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + -Xlint:all + true + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + org.test.int1.Main + + + + + diff --git a/VamPa/target/test-classes/log4j.xml b/VamPa/target/test-classes/log4j.xml new file mode 100644 index 0000000..7906a76 --- /dev/null +++ b/VamPa/target/test-classes/log4j.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/VamPa_MySQL/.gitignore b/VamPa_MySQL/.gitignore new file mode 100644 index 0000000..97d5c0f --- /dev/null +++ b/VamPa_MySQL/.gitignore @@ -0,0 +1,125 @@ + +# Created by https://www.gitignore.io/api/java,windows,eclipse +# Edit at https://www.gitignore.io/?templates=java,windows,eclipse + +### Eclipse ### +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# 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/ + +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet + +### Eclipse Patch ### +# Eclipse Core +.project + +# JDT-specific (Eclipse Java Development Tools) +.classpath + +# Annotation Processing +.apt_generated + +.sts4-cache/ + +### Java ### +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +### 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.gitignore.io/api/java,windows,eclipse \ No newline at end of file diff --git a/VamPa_MySQL/Blog_Project/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF b/VamPa_MySQL/Blog_Project/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000..d45f412 --- /dev/null +++ b/VamPa_MySQL/Blog_Project/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF @@ -0,0 +1,5 @@ +Manifest-Version: 1.0 +Built-By: sjinj +Build-Jdk: 1.8.0_221 +Created-By: Maven Integration for Eclipse + diff --git a/VamPa_MySQL/Blog_Project/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties b/VamPa_MySQL/Blog_Project/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties new file mode 100644 index 0000000..92f0974 --- /dev/null +++ b/VamPa_MySQL/Blog_Project/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties @@ -0,0 +1,7 @@ +#Generated by Maven Integration for Eclipse +#Fri Aug 07 23:18:18 KST 2020 +version=1.0.0-BUILD-SNAPSHOT +groupId=com.vam +m2e.projectName=VamPa_MySQL +m2e.projectLocation=C\:\\Users\\sjinj\\git\\blog_project\\VamPa_MySQL +artifactId=controller diff --git a/VamPa_MySQL/Blog_Project/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml b/VamPa_MySQL/Blog_Project/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml new file mode 100644 index 0000000..26845fe --- /dev/null +++ b/VamPa_MySQL/Blog_Project/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml @@ -0,0 +1,158 @@ + + + 4.0.0 + com.vam + controller + VamPa_MySQL + war + 1.0.0-BUILD-SNAPSHOT + + 1.8 + 5.0.7.RELEASE + 1.6.10 + 1.6.6 + + + + + org.springframework + spring-context + ${org.springframework-version} + + + + commons-logging + commons-logging + + + + + org.springframework + spring-webmvc + ${org.springframework-version} + + + + + org.aspectj + aspectjrt + ${org.aspectj-version} + + + + + org.slf4j + slf4j-api + ${org.slf4j-version} + + + org.slf4j + jcl-over-slf4j + ${org.slf4j-version} + runtime + + + org.slf4j + slf4j-log4j12 + ${org.slf4j-version} + runtime + + + log4j + log4j + 1.2.15 + + + javax.mail + mail + + + javax.jms + jms + + + com.sun.jdmk + jmxtools + + + com.sun.jmx + jmxri + + + runtime + + + + + javax.inject + javax.inject + 1 + + + + + javax.servlet + servlet-api + 2.5 + provided + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + javax.servlet + jstl + 1.2 + + + + + junit + junit + 4.7 + test + + + + + + maven-eclipse-plugin + 2.9 + + + org.springframework.ide.eclipse.core.springnature + + + org.springframework.ide.eclipse.core.springbuilder + + true + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + -Xlint:all + true + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + org.test.int1.Main + + + + + diff --git a/VamPa_MySQL/pom.xml b/VamPa_MySQL/pom.xml new file mode 100644 index 0000000..26845fe --- /dev/null +++ b/VamPa_MySQL/pom.xml @@ -0,0 +1,158 @@ + + + 4.0.0 + com.vam + controller + VamPa_MySQL + war + 1.0.0-BUILD-SNAPSHOT + + 1.8 + 5.0.7.RELEASE + 1.6.10 + 1.6.6 + + + + + org.springframework + spring-context + ${org.springframework-version} + + + + commons-logging + commons-logging + + + + + org.springframework + spring-webmvc + ${org.springframework-version} + + + + + org.aspectj + aspectjrt + ${org.aspectj-version} + + + + + org.slf4j + slf4j-api + ${org.slf4j-version} + + + org.slf4j + jcl-over-slf4j + ${org.slf4j-version} + runtime + + + org.slf4j + slf4j-log4j12 + ${org.slf4j-version} + runtime + + + log4j + log4j + 1.2.15 + + + javax.mail + mail + + + javax.jms + jms + + + com.sun.jdmk + jmxtools + + + com.sun.jmx + jmxri + + + runtime + + + + + javax.inject + javax.inject + 1 + + + + + javax.servlet + servlet-api + 2.5 + provided + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + javax.servlet + jstl + 1.2 + + + + + junit + junit + 4.7 + test + + + + + + maven-eclipse-plugin + 2.9 + + + org.springframework.ide.eclipse.core.springnature + + + org.springframework.ide.eclipse.core.springbuilder + + true + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + -Xlint:all + true + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + org.test.int1.Main + + + + + diff --git a/VamPa_MySQL/src/main/java/com/vam/controller/HomeController.java b/VamPa_MySQL/src/main/java/com/vam/controller/HomeController.java new file mode 100644 index 0000000..87a0d02 --- /dev/null +++ b/VamPa_MySQL/src/main/java/com/vam/controller/HomeController.java @@ -0,0 +1,39 @@ +package com.vam.controller; + +import java.text.DateFormat; +import java.util.Date; +import java.util.Locale; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * Handles requests for the application home page. + */ +@Controller +public class HomeController { + + private static final Logger logger = LoggerFactory.getLogger(HomeController.class); + + /** + * Simply selects the home view to render by returning its name. + */ + @RequestMapping(value = "/", method = RequestMethod.GET) + public String home(Locale locale, Model model) { + logger.info("Welcome home! The client locale is {}.", locale); + + Date date = new Date(); + DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); + + String formattedDate = dateFormat.format(date); + + model.addAttribute("serverTime", formattedDate ); + + return "home"; + } + +} diff --git a/VamPa_MySQL/src/main/resources/log4j.xml b/VamPa_MySQL/src/main/resources/log4j.xml new file mode 100644 index 0000000..24be56d --- /dev/null +++ b/VamPa_MySQL/src/main/resources/log4j.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml b/VamPa_MySQL/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml new file mode 100644 index 0000000..10166d1 --- /dev/null +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/spring/root-context.xml b/VamPa_MySQL/src/main/webapp/WEB-INF/spring/root-context.xml new file mode 100644 index 0000000..e071144 --- /dev/null +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/spring/root-context.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/views/home.jsp b/VamPa_MySQL/src/main/webapp/WEB-INF/views/home.jsp new file mode 100644 index 0000000..4783383 --- /dev/null +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/views/home.jsp @@ -0,0 +1,14 @@ +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ page session="false" %> + + + Home + + +

+ Hello world! +

+ +

The time on the server is ${serverTime}.

+ + diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/web.xml b/VamPa_MySQL/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..c9975d5 --- /dev/null +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,33 @@ + + + + + + contextConfigLocation + /WEB-INF/spring/root-context.xml + + + + + org.springframework.web.context.ContextLoaderListener + + + + + appServlet + org.springframework.web.servlet.DispatcherServlet + + contextConfigLocation + /WEB-INF/spring/appServlet/servlet-context.xml + + 1 + + + + appServlet + / + + + diff --git a/VamPa_MySQL/src/test/resources/log4j.xml b/VamPa_MySQL/src/test/resources/log4j.xml new file mode 100644 index 0000000..7906a76 --- /dev/null +++ b/VamPa_MySQL/src/test/resources/log4j.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/VamPa_MySQL/target/classes/log4j.xml b/VamPa_MySQL/target/classes/log4j.xml new file mode 100644 index 0000000..24be56d --- /dev/null +++ b/VamPa_MySQL/target/classes/log4j.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000..d45f412 --- /dev/null +++ b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF @@ -0,0 +1,5 @@ +Manifest-Version: 1.0 +Built-By: sjinj +Build-Jdk: 1.8.0_221 +Created-By: Maven Integration for Eclipse + diff --git a/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties new file mode 100644 index 0000000..d728907 --- /dev/null +++ b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties @@ -0,0 +1,7 @@ +#Generated by Maven Integration for Eclipse +#Fri Aug 07 23:14:53 KST 2020 +version=1.0.0-BUILD-SNAPSHOT +groupId=com.vam +m2e.projectName=VamPa_MySQL +m2e.projectLocation=D\:\\Blog_Project\\VamPa_MySQL +artifactId=controller diff --git a/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml new file mode 100644 index 0000000..26845fe --- /dev/null +++ b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml @@ -0,0 +1,158 @@ + + + 4.0.0 + com.vam + controller + VamPa_MySQL + war + 1.0.0-BUILD-SNAPSHOT + + 1.8 + 5.0.7.RELEASE + 1.6.10 + 1.6.6 + + + + + org.springframework + spring-context + ${org.springframework-version} + + + + commons-logging + commons-logging + + + + + org.springframework + spring-webmvc + ${org.springframework-version} + + + + + org.aspectj + aspectjrt + ${org.aspectj-version} + + + + + org.slf4j + slf4j-api + ${org.slf4j-version} + + + org.slf4j + jcl-over-slf4j + ${org.slf4j-version} + runtime + + + org.slf4j + slf4j-log4j12 + ${org.slf4j-version} + runtime + + + log4j + log4j + 1.2.15 + + + javax.mail + mail + + + javax.jms + jms + + + com.sun.jdmk + jmxtools + + + com.sun.jmx + jmxri + + + runtime + + + + + javax.inject + javax.inject + 1 + + + + + javax.servlet + servlet-api + 2.5 + provided + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + javax.servlet + jstl + 1.2 + + + + + junit + junit + 4.7 + test + + + + + + maven-eclipse-plugin + 2.9 + + + org.springframework.ide.eclipse.core.springnature + + + org.springframework.ide.eclipse.core.springbuilder + + true + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + -Xlint:all + true + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + org.test.int1.Main + + + + + diff --git a/VamPa_MySQL/target/test-classes/log4j.xml b/VamPa_MySQL/target/test-classes/log4j.xml new file mode 100644 index 0000000..7906a76 --- /dev/null +++ b/VamPa_MySQL/target/test-classes/log4j.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +