Skip to content

Commit

Permalink
JDBC 라이브러리 구현하기
Browse files Browse the repository at this point in the history
  • Loading branch information
kang-hyungu committed Sep 13, 2022
1 parent eef22fd commit 2903f56
Show file tree
Hide file tree
Showing 95 changed files with 297 additions and 1,140 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/build.yml

This file was deleted.

181 changes: 114 additions & 67 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
### Windows template
# 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

### Java template
# Compiled class file
*.class
Expand All @@ -37,7 +11,8 @@ $RECYCLE.BIN/
# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files
# Package Files #
*.jar
*.war
*.nar
*.ear
Expand All @@ -48,37 +23,123 @@ $RECYCLE.BIN/
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

### Example user template template
### Example user template
### JetBrains template
# 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

# IntelliJ project files
.idea
*.iml
out
gen
### Java template
# Compiled class file
*.class

# Log file
*.log
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# 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

# 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

# BlueJ files
*.ctxt
### Windows template
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Dump file
*.stackdump

# Package Files #
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# Folder config file
[Dd]esktop.ini

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

### Gradle template
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

### macOS template
# General
Expand Down Expand Up @@ -108,19 +169,5 @@ Network Trash Folder
Temporary Items
.apdisk

### Example user template template
### Example user template

# IntelliJ project files
.idea
*.iml
out
gen

# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build

/tomcat.8080/
tomcat.*
tomcat.*/**
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# jwp-dashboard-jdbc
# JDBC 라이브러리 구현하기
61 changes: 25 additions & 36 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
plugins {
id 'application'
id 'org.sonarqube' version '3.3'
id 'java'
id 'idea'
}

application {
mainClass = 'com.techcourse.JwpApplication'
}

idea {
module {
inheritOutputDirs = false
outputDir file("webapp/WEB-INF/classes")
}
}

group = 'nextstep.jwp'
version = '1.0'
group 'org.example'
version '1.0-SNAPSHOT'

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
Expand All @@ -29,31 +17,32 @@ dependencies {
implementation project(':mvc')
implementation project(':jdbc')

implementation 'ch.qos.logback:logback-classic:1.2.3'
implementation 'com.google.guava:guava:29.0-jre'

implementation 'org.apache.tomcat.embed:tomcat-embed-core:10.0.10'
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper:10.0.10'

implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.5'

implementation 'com.h2database:h2:1.4.200'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.3'
testImplementation 'org.mockito:mockito-core:3.12.3'
testImplementation 'org.assertj:assertj-core:3.20.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
implementation 'org.apache.tomcat.embed:tomcat-embed-core:10.1.0-M16'
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper:10.1.0-M16'
implementation 'ch.qos.logback:logback-classic:1.2.10'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.4'
implementation 'com.h2database:h2:2.1.214'

testImplementation 'org.assertj:assertj-core:3.22.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testImplementation 'org.mockito:mockito-core:3.+'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}

tasks.named('test') {
test {
useJUnitPlatform()
}

sonarqube {
properties {
property "sonar.sourceEncoding", "UTF-8"
property "sonar.projectKey", "woowacourse_jwp-dashboard-jdbc"
property "sonar.organization", "woowacourse"
property "sonar.host.url", "https://sonarcloud.io"
idea {
module {
inheritOutputDirs = false
outputDir file("src/main/webapp/WEB-INF/classes")
}
}

sourceSets {
main {
java.destinationDirectory.set(file('src/main/webapp/WEB-INF/classes'))
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.techcourse;

import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletRegistration;
import nextstep.mvc.DispatcherServlet;
import nextstep.mvc.controller.asis.ControllerHandlerAdapter;
import nextstep.mvc.controller.tobe.AnnotationHandlerMapping;
Expand All @@ -15,15 +14,15 @@ public class AppWebApplicationInitializer implements WebApplicationInitializer {
private static final Logger log = LoggerFactory.getLogger(AppWebApplicationInitializer.class);

@Override
public void onStartup(ServletContext servletContext) {
final DispatcherServlet dispatcherServlet = new DispatcherServlet();
public void onStartup(final ServletContext servletContext) {
final var dispatcherServlet = new DispatcherServlet();
dispatcherServlet.addHandlerMapping(new ManualHandlerMapping());
dispatcherServlet.addHandlerMapping(new AnnotationHandlerMapping("com.techcourse.controller"));

dispatcherServlet.addHandlerAdapter(new ControllerHandlerAdapter());
dispatcherServlet.addHandlerAdapter(new HandlerExecutionHandlerAdapter());

final ServletRegistration.Dynamic dispatcher = servletContext.addServlet("dispatcher", dispatcherServlet);
final var dispatcher = servletContext.addServlet("dispatcher", dispatcherServlet);
dispatcher.setLoadOnStartup(1);
dispatcher.addMapping("/");

Expand Down
Loading

0 comments on commit 2903f56

Please sign in to comment.