listAll() {
+ return userDao.listAll();
+ }
+
+ public User findById(int id) {
+ return userDao.findById(id);
+ }
+
+ public void save(User user) {
+ userDao.save(user);
+ }
+
+ public void delete(User user) {
+ userDao.delete(user);
+ }
+
+
+
+}
diff --git a/mvn-project-demo/user-web/pom.xml b/mvn-project-demo/user-web/pom.xml
new file mode 100644
index 0000000..dbd64ab
--- /dev/null
+++ b/mvn-project-demo/user-web/pom.xml
@@ -0,0 +1,249 @@
+
+
+ 4.0.0
+
+
+ org.mvn.user
+ user-parent
+ 1.0.0
+
+
+ user-web
+ war
+ user-web
+
+
+
+
+ junit
+ junit
+
+
+
+ ${project.groupId}
+ user-service
+
+
+
+ javax.servlet
+ servlet-api
+ provided
+
+
+ javax.servlet
+ jstl
+ provided
+
+
+ javax.servlet.jsp
+ jsp-api
+ provided
+
+
+
+ org.apache.struts
+ struts2-spring-plugin
+
+
+ tools
+ 1.5.0
+
+
+
+
+ org.apache.struts
+ struts2-json-plugin
+
+
+ org.apache.struts
+ struts2-convention-plugin
+
+
+ org.springframework
+ spring-webmvc
+
+
+
+ user-web
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 1.6
+ 1.6
+
+
+
+
+
+ org.apache.tomcat.maven
+ tomcat6-maven-plugin
+
+
+ org.apache.tomcat.maven
+ tomcat7-maven-plugin
+
+
+
+
+
+ org.mortbay.jetty
+ maven-jetty-plugin
+
+
+
+
+
+
+
+ org.codehaus.mojo
+ jboss-maven-plugin
+
+ localhost
+ 8080
+ D:/jboss-4.2.3.GA
+ target/maven-framework.war
+ all
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+
+
+ attach-sources
+ verify
+
+ jar-no-fork
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-site-plugin
+
+ zh_CN
+ GBK
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.8.1
+
+
+
+ org.apache.maven.plugins
+ maven-project-info-reports-plugin
+ 2.5.1
+
+ true
+ false
+
+
+
+
+ dependencies
+ project-team
+ mailing-list
+ cim
+ issue-tracking
+ license
+ scm
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-report-plugin
+ 2.9
+
+
+
+
+ org.apache.maven.plugins
+ maven-pmd-plugin
+ 2.7.1
+
+ true
+ GBK
+ 100
+ 1.5
+
+ /rulesets/basic.xml
+ /rulesets/imports.xml
+ /rulesets/unusedcode.xml
+ /rulesets/finalizers.xml
+ /rulesets/controversial.xml
+ /rulesets/strings.xml
+ /rulesets/strictexception.xml
+ /rulesets/optimizations.xml
+ /rulesets/naming.xml
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-linkcheck-plugin
+ 1.1
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jxr-plugin
+ 2.3
+
+
+
+
+
+ org.codehaus.mojo
+ cobertura-maven-plugin
+ 2.5.1
+
+ GBK
+ 1.5
+
+
+
+
+
+
+
+
+ com.springsource.bundlor
+ com.springsource.bundlor.maven
+
+ true
+
+
+
+
+
diff --git a/mvn-project-demo/user-web/src/main/java/org/user/web/UserServlet.java b/mvn-project-demo/user-web/src/main/java/org/user/web/UserServlet.java
new file mode 100644
index 0000000..9bee4b8
--- /dev/null
+++ b/mvn-project-demo/user-web/src/main/java/org/user/web/UserServlet.java
@@ -0,0 +1,25 @@
+package org.user.web;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class UserServlet extends HttpServlet {
+
+ private static final long serialVersionUID = 1L;
+
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ doPost(request, response);
+ }
+
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ response.setContentType("text/html;charset=utf-8");
+ PrintWriter writer = response.getWriter();
+ writer.write("");
+ }
+
+}
diff --git a/mvn-project-demo/user-web/src/main/webapp/WEB-INF/web.xml b/mvn-project-demo/user-web/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..1de51e3
--- /dev/null
+++ b/mvn-project-demo/user-web/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,17 @@
+
+
+
+ Archetype Created Web Application
+
+ UserServlet
+ UserServlet
+
+ org.user.web.UserServlet
+
+
+ UserServlet
+ /UserServlet
+
+
diff --git a/mvn-project-demo/user-web/src/main/webapp/index.jsp b/mvn-project-demo/user-web/src/main/webapp/index.jsp
new file mode 100644
index 0000000..c38169b
--- /dev/null
+++ b/mvn-project-demo/user-web/src/main/webapp/index.jsp
@@ -0,0 +1,5 @@
+
+
+Hello World!
+
+
diff --git a/spring-boot-helloworld/pom.xml b/spring-boot-helloworld/pom.xml
new file mode 100644
index 0000000..bed6fdb
--- /dev/null
+++ b/spring-boot-helloworld/pom.xml
@@ -0,0 +1,62 @@
+
+
+ 4.0.0
+
+ spring-boot-helloworld
+ spring-boot-helloworld
+ 1.0-SNAPSHOT
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 0.5.0.BUILD-SNAPSHOT
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
+
+
+
+
+ spring-snapshots
+ http://repo.spring.io/snapshot
+ true
+
+
+ spring-milestones
+ http://repo.spring.io/milestone
+ true
+
+
+
+
+ spring-snapshots
+ http://repo.spring.io/snapshot
+
+
+ spring-milestones
+ http://repo.spring.io/milestone
+
+
+
+
\ No newline at end of file
diff --git a/spring-boot-helloworld/src/main/java/com/sishuok/Application.java b/spring-boot-helloworld/src/main/java/com/sishuok/Application.java
new file mode 100644
index 0000000..69be765
--- /dev/null
+++ b/spring-boot-helloworld/src/main/java/com/sishuok/Application.java
@@ -0,0 +1,20 @@
+package com.sishuok;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * User: Zhang Kaitao
+ *
Date: 13-12-22
+ *
Version: 1.0
+ */
+@EnableAutoConfiguration
+@Configuration
+@ComponentScan
+public class Application {
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class);
+ }
+}
diff --git a/spring-boot-helloworld/src/main/java/com/sishuok/controller/UserController.java b/spring-boot-helloworld/src/main/java/com/sishuok/controller/UserController.java
new file mode 100644
index 0000000..d93299e
--- /dev/null
+++ b/spring-boot-helloworld/src/main/java/com/sishuok/controller/UserController.java
@@ -0,0 +1,31 @@
+package com.sishuok.controller;
+
+import com.sishuok.entity.User;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ *
User: Zhang Kaitao
+ *
Date: 13-12-22
+ *
Version: 1.0
+ */
+@EnableAutoConfiguration
+@RestController
+@RequestMapping("/user")
+public class UserController {
+
+ @RequestMapping("/{id}")
+ private User view(@PathVariable("id") Long id) {
+ User user = new User();
+ user.setId(id);
+ user.setName("zhang");
+ return user;
+ }
+
+ public static void main(String[] args) {
+ SpringApplication.run(UserController.class);
+ }
+}
diff --git a/spring-boot-helloworld/src/main/java/com/sishuok/entity/User.java b/spring-boot-helloworld/src/main/java/com/sishuok/entity/User.java
new file mode 100644
index 0000000..54c2073
--- /dev/null
+++ b/spring-boot-helloworld/src/main/java/com/sishuok/entity/User.java
@@ -0,0 +1,29 @@
+package com.sishuok.entity;
+
+import java.io.Serializable;
+
+/**
+ *
User: Zhang Kaitao
+ *
Date: 13-12-22
+ *
Version: 1.0
+ */
+public class User implements Serializable {
+ private Long id;
+ private String name;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}