Skip to content

Commit 195d0f9

Browse files
committed
using spring-jdbc 4.0.0
1 parent 1467814 commit 195d0f9

19 files changed

Lines changed: 182 additions & 4 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#Fri Nov 29 14:10:26 CST 2013
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

20.3 KB
Binary file not shown.
42.7 KB
Binary file not shown.
18.4 KB
Binary file not shown.
27.3 KB
Binary file not shown.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<gradle-project-properties>
3+
<!--DO NOT EDIT THIS FILE! - Used by the Gradle plugin of NetBeans.-->
4+
<auxiliary>
5+
<editor-bookmarks lastBookmarkId="0" xmlns="http://www.netbeans.org/ns/editor-bookmarks/2"/>
6+
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
7+
<group>
8+
<file>file:/home/codedata/workspace/SpringMVC/src/main/webapp/WEB-INF/dispatcher-servlet.xml</file>
9+
<file>file:/home/codedata/workspace/SpringMVC/src/main/webapp/home.jsp</file>
10+
<file>file:/home/codedata/workspace/SpringMVC/src/main/java/tw/codedata/SampleController.java</file>
11+
</group>
12+
</open-files>
13+
</auxiliary>
14+
</gradle-project-properties>

demos/SpringMVC/build.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apply plugin: 'tomcat'
2+
3+
buildscript {
4+
repositories {
5+
jcenter()
6+
}
7+
8+
dependencies {
9+
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.0'
10+
}
11+
}
12+
13+
repositories {
14+
mavenCentral()
15+
}
16+
17+
dependencies {
18+
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
19+
compile 'org.springframework:spring-webmvc:4.0.0.RELEASE'
20+
21+
def tomcatVersion = '7.0.11'
22+
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
23+
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}"
24+
tomcat("org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}") {
25+
exclude group: 'org.eclipse.jdt.core.compiler', module: 'ecj'
26+
}
27+
}

demos/SpringMVC/build.gradle~

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apply plugin: 'tomcat'
2+
3+
buildscript {
4+
repositories {
5+
jcenter()
6+
}
7+
8+
dependencies {
9+
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.0'
10+
}
11+
}
12+
13+
repositories {
14+
mavenCentral()
15+
}
16+
17+
dependencies {
18+
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
19+
compile 'org.springframework:spring-webmvc:4.0.0.RELEASE'
20+
runtime 'javax.servlet:jstl:1.1.2'
21+
def tomcatVersion = '7.0.11'
22+
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
23+
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}"
24+
tomcat("org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}") {
25+
exclude group: 'org.eclipse.jdt.core.compiler', module: 'ecj'
26+
}
27+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package tw.codedata;
2+
3+
import org.springframework.stereotype.Controller;
4+
import org.springframework.ui.Model;
5+
import org.springframework.web.bind.annotation.*;
6+
7+
@Controller
8+
public class HelloWorld {
9+
@RequestMapping("hello")
10+
public String hello(@RequestParam("user") String user, Model m) {
11+
m.addAttribute("user", user);
12+
return "hello";
13+
}
14+
}

0 commit comments

Comments
 (0)