commit 9c89bb3a6c624920ce0e47675e7c358d67ea901a Author: Tommy Parnell Date: Sat Jun 27 10:27:56 2015 -0400 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..27d1069 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +.idea/ +out/ \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..9a35821 --- /dev/null +++ b/readme.md @@ -0,0 +1 @@ +Just a simple spring app. Mostly me trying out java, because I havn't done it in an while, and I have not done much java web stuff. I also wanted to just see how the new streams api worked. \ No newline at end of file diff --git a/src/org/tparnell/mainController.java b/src/org/tparnell/mainController.java new file mode 100644 index 0000000..fb69d53 --- /dev/null +++ b/src/org/tparnell/mainController.java @@ -0,0 +1,28 @@ +/** + * Created by Tommy on 6/27/2015. + */ + +package org.tparnell; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; + +import java.util.ArrayList; + +@Controller +public class mainController { + + @RequestMapping("/welcome") + public ModelAndView helloStreams(){ + ArrayList lst = new ArrayList(); + lst.add("awesome"); + lst.add("awesome4"); + + lst.stream() + .filter(t-> t.contains("awesome")) + .sorted(); + + return new ModelAndView("welcome", "message", "message"); + } +} diff --git a/src/spring-config.xml b/src/spring-config.xml new file mode 100644 index 0000000..142def2 --- /dev/null +++ b/src/spring-config.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/todo2.iml b/todo2.iml new file mode 100644 index 0000000..f340f9f --- /dev/null +++ b/todo2.iml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + file://$MODULE_DIR$/src/spring-config.xml + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/WEB-INF/spring-servlet.xml b/web/WEB-INF/spring-servlet.xml new file mode 100644 index 0000000..5ea3be4 --- /dev/null +++ b/web/WEB-INF/spring-servlet.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml new file mode 100644 index 0000000..baa1707 --- /dev/null +++ b/web/WEB-INF/web.xml @@ -0,0 +1,22 @@ + + + TparnellStartingSpring + + index.jsp + + + + tparnell + + org.springframework.web.servlet.DispatcherServlet + + 1 + + + tparnell + /welcome.jsp + /welcome.html + *.html + + + \ No newline at end of file diff --git a/web/WEB-INF/welcome.jsp b/web/WEB-INF/welcome.jsp new file mode 100644 index 0000000..78a3976 --- /dev/null +++ b/web/WEB-INF/welcome.jsp @@ -0,0 +1,16 @@ + + + Getting started with spring mvc + + +${message} + +
+
+
+
+ + \ No newline at end of file diff --git a/web/index.jsp b/web/index.jsp new file mode 100644 index 0000000..0cef971 --- /dev/null +++ b/web/index.jsp @@ -0,0 +1,16 @@ +<%-- + Created by IntelliJ IDEA. + User: Tommy + Date: 6/27/2015 + Time: 9:59 AM + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + + + + + +