Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step1 user completed no database #21

Open
wants to merge 8 commits into
base: step1-user-completed-no-database
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/.settings/
/target/
/.classpath
/.project
/jwp-basic.iml
/.idea/
/tomcat.8080/
157 changes: 157 additions & 0 deletions bin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.nhnnext</groupId>
<artifactId>jwp-basic</artifactId>
<version>1.0</version>
<packaging>war</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<org.springframework.version>4.2.5.RELEASE</org.springframework.version>
<tomcat.version>8.0.15</tomcat.version>
</properties>

<dependencies>
<!-- unit testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>

<!-- servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.167</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${org.springframework.version}</version>
</dependency>

<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.10</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.2</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.4.4</version>
</dependency>


<!-- tomcat -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-logging-juli</artifactId>
<version>${tomcat.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<version>${tomcat.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<finalName>jwp-basic</finalName>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<outputDirectory>webapp/WEB-INF/classes</outputDirectory>
<testOutputDirectory>target/test-classes</testOutputDirectory>

<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>

<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<warSourceDirectory>webapp</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>utf-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
Binary file added bin/src/main/java/core/controller/Controller.class
Binary file not shown.
Binary file added bin/src/main/java/core/db/DataBase.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added bin/src/main/java/next/dao/UserDao.class
Binary file not shown.
Binary file added bin/src/main/java/next/model/User.class
Binary file not shown.
Binary file not shown.
Binary file added bin/src/main/resources/h2-1.3.167.jar
Binary file not shown.
12 changes: 12 additions & 0 deletions bin/src/main/resources/jwp.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
DROP TABLE IF EXISTS USERS;

CREATE TABLE USERS (
userId varchar(12) NOT NULL,
password varchar(12) NOT NULL,
name varchar(20) NOT NULL,
email varchar(50),

PRIMARY KEY (userId)
);

INSERT INTO USERS VALUES('admin', 'password', '자바지기', '[email protected]');
17 changes: 17 additions & 0 deletions bin/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d{HH:mm:ss.SSS} [%-5level] [%thread] [%logger{36}] - %m%n</Pattern>
</layout>
</appender>

<logger name="core" level="DEBUG" />

<logger name="next" level="DEBUG" />

<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
</configuration>
1 change: 1 addition & 0 deletions bin/src/main/resources/startdb.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java -cp h2-1.3.167.jar org.h2.tools.Server
Binary file added bin/src/test/java/next/WebServerLauncher.class
Binary file not shown.
Binary file added bin/src/test/java/next/dao/UserDaoTest.class
Binary file not shown.
8 changes: 8 additions & 0 deletions bin/src/test/resources/templates/helloworld.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FreeMarker Template 예제 : ${message}

=======================
=== County List ====
=======================
<#list countries as country>
${country_index + 1}. ${country}
</#list>
23 changes: 23 additions & 0 deletions bin/sync_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

REPOSITORY_DIR=~/jwp-workspace/cherry-pick/jwp-basic

BRANCHES=("step0-getting-started" "step1-user-completed-no-database" "step2-user-with-mvc-framework" "step3-user-completed-database" "step4-qna-getting-started" "step5-qna-with-ajax" "step6-qna-with-mvc-framework" "step7-self-check" "step8-self-check-completed" "step9-mvc-framework-completed" "step10-di-getting-started" "step11-1st-di-framework" "step12-2nd-di-framework" "step13-3rd-di-framework" "step14-di-framework-completed" "step15-spring-orm-framework")
COMMIT_REVISION=a33b298

rm -rf $REPOSITORY_DIR

git clone https://github.com/slipp/jwp-basic.git

cd $REPOSITORY_DIR
pwd

for BRANCH_NAME in "${BRANCHES[@]}"; do
git cherry-pick --quit
echo $BRANCH_NAME
git checkout -b $BRANCH_NAME origin/$BRANCH_NAME
git cherry-pick $COMMIT_REVISION
git push origin $BRANCH_NAME
done

echo "Finished."
1 change: 1 addition & 0 deletions bin/webapp/WEB-INF/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/classes/
Binary file not shown.
Binary file added bin/webapp/WEB-INF/lib/jstl-1.2.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions bin/webapp/css/bootstrap.min.css

Large diffs are not rendered by default.

Loading