Initial commit
This commit is contained in:
171
pom.xml
Normal file
171
pom.xml
Normal file
@@ -0,0 +1,171 @@
|
||||
<?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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>co.nook</groupId>
|
||||
<artifactId>app</artifactId>
|
||||
<name>NookSearchSystem</name>
|
||||
<packaging>war</packaging>
|
||||
<version>1.0.0-BUILD-SNAPSHOT</version>
|
||||
<properties>
|
||||
<java-version>1.8</java-version>
|
||||
<org.springframework-version>5.2.5.RELEASE</org.springframework-version>
|
||||
<org.aspectj-version>1.9.5</org.aspectj-version>
|
||||
<org.slf4j-version>1.7.30</org.slf4j-version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<!-- Spring -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>${org.springframework-version}</version>
|
||||
<exclusions>
|
||||
<!-- Exclude Commons Logging in favor of SLF4j -->
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<version>${org.springframework-version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
<version>${org.springframework-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- AspectJ -->
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjrt</artifactId>
|
||||
<version>${org.aspectj-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Logging -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${org.slf4j-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<version>${org.slf4j-version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${org.slf4j-version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.15</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>javax.mail</groupId>
|
||||
<artifactId>mail</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>javax.jms</groupId>
|
||||
<artifactId>jms</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.sun.jdmk</groupId>
|
||||
<artifactId>jmxtools</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.sun.jmx</groupId>
|
||||
<artifactId>jmxri</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- @Inject -->
|
||||
<dependency>
|
||||
<groupId>javax.inject</groupId>
|
||||
<artifactId>javax.inject</artifactId>
|
||||
<version>1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Servlet -->
|
||||
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet.jsp</groupId>
|
||||
<artifactId>javax.servlet.jsp-api</artifactId>
|
||||
<version>2.3.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Test -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.7</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<version>2.9</version>
|
||||
<configuration>
|
||||
<additionalProjectnatures>
|
||||
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
|
||||
</additionalProjectnatures>
|
||||
<additionalBuildcommands>
|
||||
<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
|
||||
</additionalBuildcommands>
|
||||
<downloadSources>true</downloadSources>
|
||||
<downloadJavadocs>true</downloadJavadocs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<compilerArgument>-Xlint:all</compilerArgument>
|
||||
<showWarnings>true</showWarnings>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<configuration>
|
||||
<mainClass>org.test.int1.Main</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
39
src/main/java/co/nook/app/HomeController.java
Normal file
39
src/main/java/co/nook/app/HomeController.java
Normal file
@@ -0,0 +1,39 @@
|
||||
package co.nook.app;
|
||||
|
||||
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 = "home.do", 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 "login/login_form";
|
||||
}
|
||||
|
||||
}
|
||||
18
src/main/java/co/nook/app/join/JoinController.java
Normal file
18
src/main/java/co/nook/app/join/JoinController.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package co.nook.app.join;
|
||||
|
||||
import co.nook.app.member.MemberVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
public class JoinController{
|
||||
|
||||
MemberVO vo;
|
||||
@Autowired
|
||||
public JoinController( MemberVO vo){
|
||||
this.vo = vo;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
32
src/main/java/co/nook/app/login/LoginController.java
Normal file
32
src/main/java/co/nook/app/login/LoginController.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package co.nook.app.login;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@Controller
|
||||
public class LoginController{
|
||||
|
||||
|
||||
ModelAndView mav;
|
||||
|
||||
public LoginController(@Autowired ModelAndView mav){
|
||||
this.mav = mav;
|
||||
}
|
||||
|
||||
@RequestMapping("/loginCheck.do")
|
||||
public ModelAndView loginCheck(@RequestParam String id, @RequestParam String pw, HttpServletRequest request, Model model){
|
||||
|
||||
mav.setViewName("todo/todo_form");
|
||||
request.getSession().setAttribute("id", id);
|
||||
|
||||
|
||||
|
||||
return mav;
|
||||
}
|
||||
}
|
||||
31
src/main/java/co/nook/app/member/MemberVO.java
Normal file
31
src/main/java/co/nook/app/member/MemberVO.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package co.nook.app.member;
|
||||
|
||||
public class MemberVO{
|
||||
int member_no;
|
||||
String id;
|
||||
String pw;
|
||||
|
||||
public int getMember_no(){
|
||||
return member_no;
|
||||
}
|
||||
|
||||
public void setMember_no(int member_no){
|
||||
this.member_no = member_no;
|
||||
}
|
||||
|
||||
public String getId(){
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id){
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getPw(){
|
||||
return pw;
|
||||
}
|
||||
|
||||
public void setPw(String pw){
|
||||
this.pw = pw;
|
||||
}
|
||||
}
|
||||
6
src/main/resources/config/mappers/mapper.xml
Normal file
6
src/main/resources/config/mappers/mapper.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?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="co.nook.app.mybatis.UserMapper">
|
||||
|
||||
</mapper>
|
||||
0
src/main/resources/config/mybatis-config.xml
Normal file
0
src/main/resources/config/mybatis-config.xml
Normal file
41
src/main/resources/log4j.xml
Normal file
41
src/main/resources/log4j.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
|
||||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
|
||||
|
||||
<!-- Appenders -->
|
||||
<appender name="console" class="org.apache.log4j.ConsoleAppender">
|
||||
<param name="Target" value="System.out" />
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-5p: %c - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- Application Loggers -->
|
||||
<logger name="co.nook.app">
|
||||
<level value="info" />
|
||||
</logger>
|
||||
|
||||
<!-- 3rdparty Loggers -->
|
||||
<logger name="org.springframework.core">
|
||||
<level value="info" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.beans">
|
||||
<level value="info" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.context">
|
||||
<level value="info" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.web">
|
||||
<level value="info" />
|
||||
</logger>
|
||||
|
||||
<!-- Root Logger -->
|
||||
<root>
|
||||
<priority value="warn" />
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
</log4j:configuration>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/mvc https://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
|
||||
|
||||
<!-- Enables the Spring MVC @Controller programming model -->
|
||||
<annotation-driven />
|
||||
|
||||
<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
|
||||
<resources mapping="/resources/**" location="/resources/" />
|
||||
|
||||
<!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
|
||||
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<beans:property name="prefix" value="/WEB-INF/views/" />
|
||||
<beans:property name="suffix" value=".jsp" />
|
||||
</beans:bean>
|
||||
|
||||
<context:component-scan base-package="co.nook.app" />
|
||||
|
||||
|
||||
|
||||
</beans:beans>
|
||||
9
src/main/webapp/WEB-INF/spring/bean-context.xml
Normal file
9
src/main/webapp/WEB-INF/spring/bean-context.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean name="commonMav" class="org.springframework.web.servlet.ModelAndView" />
|
||||
<bean id="memVO" class="co.nook.app.member.MemberVO"/>
|
||||
|
||||
</beans>
|
||||
11
src/main/webapp/WEB-INF/spring/root-context.xml
Normal file
11
src/main/webapp/WEB-INF/spring/root-context.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
|
||||
<!-- Root Context: defines shared resources visible to all other web components -->
|
||||
|
||||
|
||||
|
||||
</beans>
|
||||
15
src/main/webapp/WEB-INF/views/home.jsp
Normal file
15
src/main/webapp/WEB-INF/views/home.jsp
Normal file
@@ -0,0 +1,15 @@
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ page session="false" %>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Home</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/bootstrap.min.css">
|
||||
<script src="${pageContext.request.contextPath}/resources/js/jquery-3.5.0.min.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/resources/js/popper.min.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/resources/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
31
src/main/webapp/WEB-INF/views/login/login_form.jsp
Normal file
31
src/main/webapp/WEB-INF/views/login/login_form.jsp
Normal file
@@ -0,0 +1,31 @@
|
||||
<%--
|
||||
User: Suh
|
||||
Date: 2020-04-22
|
||||
Time: 오후 11:14
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>Title</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/bootstrap.min.css">
|
||||
<script src="${pageContext.request.contextPath}/resources/js/jquery-3.5.0.min.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/resources/js/popper.min.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/resources/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container h-100">
|
||||
<div class="d-flex flex-wrap justify-content-center align-content-center h-100">
|
||||
<form id="frm" name="frm" method="post" action="loginCheck.do">
|
||||
<label for="id">ID : </label>
|
||||
<input class="form-control" type="text" id="id" name="id" aria-describedby="idHelp">
|
||||
<small id="idHelp" class="form-text text-muted">아이디를 입력해주세요</small>
|
||||
<label for="pw">PW : </label>
|
||||
<input class="form-control" type="password" id="pw" name="pw" aria-describedby="pwHelp">
|
||||
<small id="pwHelp" class="form-text text-muted">비밀번호를 입력해주세요</small>
|
||||
<button class="btn btn-primary" type="submit">로그인</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
15
src/main/webapp/WEB-INF/views/login/login_ok.jsp
Normal file
15
src/main/webapp/WEB-INF/views/login/login_ok.jsp
Normal file
@@ -0,0 +1,15 @@
|
||||
<%--
|
||||
User: Suh
|
||||
Date: 2020-04-22
|
||||
Time: 오후 11:33
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>${id}님 환영합니다</h1>
|
||||
<h1>입력하신 비밀번호는 ${pw} 입니다</h1>
|
||||
</body>
|
||||
</html>
|
||||
71
src/main/webapp/WEB-INF/views/todo/todo_form.html
Normal file
71
src/main/webapp/WEB-INF/views/todo/todo_form.html
Normal file
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Title</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../../../resources/css/bootstrap.min.css">
|
||||
<script src="../../../resources/js/jquery-3.5.0.min.js"></script>
|
||||
<script src="../../../resources/js/popper.min.js"></script>
|
||||
<script src="../../../resources/js/bootstrap.min.js"></script>
|
||||
<style>
|
||||
.w-14{
|
||||
width : 6.4em;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(function(){
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="btn-toolbar d-flex justify-content-center" role="toolbar"
|
||||
aria-label="Toolbar with button groups">
|
||||
<div class="btn-group mr-2 " role="group" aria-label="First group">
|
||||
<button id="btnMon" type="button" class="btn btn-secondary w-14">월요일</button>
|
||||
<button id="btnTue" type="button" class="btn btn-secondary w-14">화요일</button>
|
||||
<button id="btnWed" type="button" class="btn btn-secondary w-14">수요일</button>
|
||||
<button id="btnThu" type="button" class="btn btn-secondary w-14">목요일</button>
|
||||
<button id="btnFri" type="button" class="btn btn-secondary w-14">금요일</button>
|
||||
<button id="btnSat" type="button" class="btn btn-secondary w-14">K.K(토)</button>
|
||||
<button id="btnSun" type="button" class="btn btn-secondary w-14">무파니(일)</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pt-3">
|
||||
<div class="col-12">
|
||||
<h1 class="text-center">할 일</h1>
|
||||
<div id="todo_body" class="p-2 border border-dark">
|
||||
<table id="tbTodo "class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">할 일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="moveRow">
|
||||
<th scope="row">1</th>
|
||||
<td>돌 캐기</td>
|
||||
</tr>
|
||||
<tr class="moveRow">
|
||||
<th scope="row">2</th>
|
||||
<td>나무 베기</td>
|
||||
</tr>
|
||||
<tr class="moveRow">
|
||||
<th scope="row">3</th>
|
||||
<td>주민에게 레시피 받기1</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
100
src/main/webapp/WEB-INF/views/todo/todo_form.jsp
Normal file
100
src/main/webapp/WEB-INF/views/todo/todo_form.jsp
Normal file
@@ -0,0 +1,100 @@
|
||||
<%--
|
||||
User: Suh
|
||||
Date: 2020-04-23
|
||||
Time: 오후 10:22
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Title</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/bootstrap.min.css">
|
||||
<script src="${pageContext.request.contextPath}/resources/js/jquery-3.5.0.min.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/resources/js/popper.min.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/resources/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/js/all.min.js" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/todo.css">
|
||||
<style>
|
||||
.w-14{
|
||||
width : 6.4em;
|
||||
}
|
||||
|
||||
tr{
|
||||
cursor : pointer;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(function(){
|
||||
|
||||
$("tr").bind("click", function(){
|
||||
let $input = $(this).find("input");
|
||||
let $label = $(this).find("label");
|
||||
if($input.prop("checked")){
|
||||
$input.prop("checked", false);
|
||||
$label.html($label.text());
|
||||
}else{
|
||||
$input.prop("checked", true);
|
||||
$label.wrapInner("<del></del>");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="btn-toolbar d-flex justify-content-center" role="toolbar"
|
||||
aria-label="Toolbar with button groups">
|
||||
<div class="btn-group mr-2 " role="group" aria-label="First group">
|
||||
<button id="btnMon" type="button" class="btn btn-secondary w-14">월요일</button>
|
||||
<button id="btnTue" type="button" class="btn btn-secondary w-14">화요일</button>
|
||||
<button id="btnWed" type="button" class="btn btn-secondary w-14">수요일</button>
|
||||
<button id="btnThu" type="button" class="btn btn-secondary w-14">목요일</button>
|
||||
<button id="btnFri" type="button" class="btn btn-secondary w-14">금요일</button>
|
||||
<button id="btnSat" type="button" class="btn btn-secondary w-14">K.K(토)</button>
|
||||
<button id="btnSun" type="button" class="btn btn-secondary w-14">무파니(일)</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pt-3">
|
||||
<div class="col-12">
|
||||
<h1 class="text-center">할 일</h1>
|
||||
<div id="todo_body" class="p-2 border border-dark">
|
||||
<table id="tbTodo"class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">할 일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="moveRow">
|
||||
<th scope="row">1</th>
|
||||
<td>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input id="checkbox1" type="checkbox" class="custom-control-input todo_input_checkbox">
|
||||
<label class="custom-control-label font" for="checkbox1"> 돌 캐기</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="moveRow">
|
||||
<th scope="row">2</th>
|
||||
<td>나무 베기</td>
|
||||
</tr>
|
||||
<tr class="moveRow">
|
||||
<th scope="row">3</th>
|
||||
<td>주민에게 레시피 받기1</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input id="check" type="checkbox">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
34
src/main/webapp/WEB-INF/web.xml
Normal file
34
src/main/webapp/WEB-INF/web.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee https://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.jsp</welcome-file>
|
||||
</welcome-file-list>
|
||||
<!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>/WEB-INF/spring/*-context.xml</param-value>
|
||||
</context-param>
|
||||
<!-- Creates the Spring Container shared by all Servlets and Filters -->
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- Processes application requests -->
|
||||
<servlet>
|
||||
<servlet-name>appServlet</servlet-name>
|
||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
|
||||
</init-param>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>appServlet</servlet-name>
|
||||
<url-pattern>*.do</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
</web-app>
|
||||
7
src/main/webapp/faces-config.xml
Normal file
7
src/main/webapp/faces-config.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
|
||||
version="2.0">
|
||||
</faces-config>
|
||||
14
src/main/webapp/index.jsp
Normal file
14
src/main/webapp/index.jsp
Normal file
@@ -0,0 +1,14 @@
|
||||
<%--
|
||||
User: Suh
|
||||
Date: 2020-04-22
|
||||
Time: 오후 9:57
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<jsp:forward page="home.do" />
|
||||
</body>
|
||||
</html>
|
||||
7
src/main/webapp/resources/css/bootstrap.min.css
vendored
Normal file
7
src/main/webapp/resources/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
21
src/main/webapp/resources/css/todo.css
Normal file
21
src/main/webapp/resources/css/todo.css
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
.custom-control-label::before{
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
|
||||
}
|
||||
|
||||
.custom-checkbox .custom-control-input:checked~.custom-control-label::before{
|
||||
|
||||
background-color: #1e7e34;
|
||||
}
|
||||
|
||||
.custom-control-label::before{
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.custom-control-label{
|
||||
font-size: 1rem;
|
||||
}
|
||||
7
src/main/webapp/resources/js/bootstrap.min.js
vendored
Normal file
7
src/main/webapp/resources/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
src/main/webapp/resources/js/jquery-3.5.0.min.js
vendored
Normal file
2
src/main/webapp/resources/js/jquery-3.5.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
src/main/webapp/resources/js/popper.min.js
vendored
Normal file
5
src/main/webapp/resources/js/popper.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user