Skip to content

Commit bc79dc2

Browse files
committed
first massive add
1 parent 9450ad7 commit bc79dc2

26 files changed

+535
-0
lines changed

.classpath

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" output="target/classes" path="src">
4+
<attributes>
5+
<attribute name="optional" value="true"/>
6+
<attribute name="maven.pomderived" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
10+
<attributes>
11+
<attribute name="maven.pomderived" value="true"/>
12+
</attributes>
13+
</classpathentry>
14+
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.0">
15+
<attributes>
16+
<attribute name="owner.project.facets" value="jst.web"/>
17+
</attributes>
18+
</classpathentry>
19+
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
20+
<attributes>
21+
<attribute name="maven.pomderived" value="true"/>
22+
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
23+
</attributes>
24+
</classpathentry>
25+
<classpathentry kind="output" path="target/classes"/>
26+
</classpath>

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Maven
2+
build/
3+
log/
4+
target/

.project

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>spring-tutorial-me</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.jdt.core.javabuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.wst.common.project.facet.core.builder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>org.eclipse.wst.validation.validationbuilder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
<buildCommand>
29+
<name>org.springframework.ide.eclipse.core.springbuilder</name>
30+
<arguments>
31+
</arguments>
32+
</buildCommand>
33+
<buildCommand>
34+
<name>org.eclipse.m2e.core.maven2Builder</name>
35+
<arguments>
36+
</arguments>
37+
</buildCommand>
38+
</buildSpec>
39+
<natures>
40+
<nature>org.springframework.ide.eclipse.core.springnature</nature>
41+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
42+
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
43+
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
44+
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
45+
<nature>org.eclipse.jdt.core.javanature</nature>
46+
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
47+
</natures>
48+
</projectDescription>

.settings/.jsdtscope

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="WebContent"/>
4+
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
5+
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
6+
<attributes>
7+
<attribute name="hide" value="true"/>
8+
</attributes>
9+
</classpathentry>
10+
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
11+
<classpathentry kind="output" path=""/>
12+
</classpath>

.settings/org.eclipse.jdt.core.prefs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4+
org.eclipse.jdt.core.compiler.compliance=1.8
5+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7+
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
8+
org.eclipse.jdt.core.compiler.source=1.8

.settings/org.eclipse.m2e.core.prefs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
activeProfiles=
2+
eclipse.preferences.version=1
3+
resolveWorkspaceProjects=true
4+
version=1
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
2+
<wb-module deploy-name="spring-tutorial-me">
3+
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
4+
<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
5+
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
6+
<property name="java-output-path" value="/spring-tutorial-me/build/classes"/>
7+
<property name="context-root" value="offers"/>
8+
</wb-module>
9+
</project-modules>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<faceted-project>
3+
<runtime name="Apache Tomcat v8.0"/>
4+
<fixed facet="jst.web"/>
5+
<fixed facet="java"/>
6+
<fixed facet="wst.jsdt.web"/>
7+
<installed facet="java" version="1.8"/>
8+
<installed facet="jst.web" version="2.5"/>
9+
<installed facet="wst.jsdt.web" version="1.0"/>
10+
</faceted-project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Window
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
disabled=06target
2+
eclipse.preferences.version=1

.springBeans

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beansProjectDescription>
3+
<version>1</version>
4+
<pluginVersion><![CDATA[3.7.1.201510041102-RELEASE]]></pluginVersion>
5+
<configSuffixes>
6+
<configSuffix><![CDATA[xml]]></configSuffix>
7+
</configSuffixes>
8+
<enableImports><![CDATA[false]]></enableImports>
9+
<configs>
10+
<config>WebContent/WEB-INF/offers-servlet.xml</config>
11+
<config>src/com/runnerdave/spring/web/config/dao-context.xml</config>
12+
<config>src/com/runnerdave/spring/web/config/service-context.xml</config>
13+
</configs>
14+
<autoconfigs>
15+
</autoconfigs>
16+
<configSets>
17+
</configSets>
18+
</beansProjectDescription>

WebContent/META-INF/MANIFEST.MF

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest-Version: 1.0
2+
Class-Path:
3+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<%@ page language="java" contentType="text/html; charset=UTF-8"
2+
pageEncoding="UTF-8"%>
3+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4+
<html>
5+
<head>
6+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7+
<title>Insert title here</title>
8+
</head>
9+
<body>
10+
<p>under construction</p>
11+
</body>
12+
</html>

WebContent/WEB-INF/jsps/home.jsp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<%@ page language="java" contentType="text/html; charset=UTF-8"
2+
pageEncoding="UTF-8"%>
3+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
4+
5+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
6+
<html>
7+
<head>
8+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
9+
<title>Insert title here</title>
10+
</head>
11+
<body>
12+
Hi there caballos!
13+
14+
<p><a href="${pageContext.request.contextPath}/offers">List offers</a></p>
15+
16+
<p><a href="${pageContext.request.contextPath}/createoffer">Create offers</a></p>
17+
18+
19+
20+
21+
</body>
22+
</html>

WebContent/WEB-INF/jsps/offers.jsp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<%@ page language="java" contentType="text/html; charset=UTF-8"
2+
pageEncoding="UTF-8"%>
3+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
4+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5+
<html>
6+
<head>
7+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
8+
<title>Insert title here</title>
9+
</head>
10+
<body>
11+
<h2>Results</h2>
12+
13+
<c:forEach var="offer" items="${offers}">
14+
<p>Offer: ${offer}</p>
15+
</c:forEach>
16+
</body>
17+
</html>

WebContent/WEB-INF/offers-servlet.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans xmlns="http://www.springframework.org/schema/beans"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:mvc="http://www.springframework.org/schema/mvc"
5+
xmlns:context="http://www.springframework.org/schema/context"
6+
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
7+
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
8+
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd">
9+
10+
<context:component-scan base-package="com.runnerdave.spring.web.controllers">
11+
</context:component-scan>
12+
<mvc:annotation-driven></mvc:annotation-driven>
13+
<bean id="jspViewResolver"
14+
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
15+
<property name="prefix" value="/WEB-INF/jsps/"></property>
16+
<property name="suffix" value=".jsp"></property>
17+
</bean>
18+
</beans>

WebContent/WEB-INF/web.xml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://java.sun.com/xml/ns/javaee"
4+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
5+
id="WebApp_ID" version="2.5">
6+
<display-name>spring-tutorial-me</display-name>
7+
<welcome-file-list>
8+
<welcome-file>index.html</welcome-file>
9+
<welcome-file>index.htm</welcome-file>
10+
<welcome-file>index.jsp</welcome-file>
11+
<welcome-file>default.html</welcome-file>
12+
<welcome-file>default.htm</welcome-file>
13+
<welcome-file>default.jsp</welcome-file>
14+
</welcome-file-list>
15+
<servlet>
16+
<description></description>
17+
<display-name>offers</display-name>
18+
<servlet-name>offers</servlet-name>
19+
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
20+
<load-on-startup>1</load-on-startup>
21+
</servlet>
22+
<servlet-mapping>
23+
<servlet-name>offers</servlet-name>
24+
<url-pattern>/</url-pattern>
25+
</servlet-mapping>
26+
27+
<description>Spring database</description>
28+
<resource-ref>
29+
<description>DB Connection</description>
30+
<res-ref-name>jdbc/spring-tutorial</res-ref-name>
31+
<res-type>javax.sql.DataSource</res-type>
32+
<res-auth>Container</res-auth>
33+
</resource-ref>
34+
35+
<listener>
36+
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
37+
</listener>
38+
39+
<context-param>
40+
<param-name>contextConfigLocation</param-name>
41+
<param-value>
42+
classpath:com/runnerdave/spring/web/config/dao-context.xml
43+
classpath:com/runnerdave/spring/web/config/service-context.xml
44+
</param-value>
45+
</context-param>
46+
</web-app>

pom.xml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<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">
2+
<modelVersion>4.0.0</modelVersion>
3+
<groupId>com.runnerdave.spring.web</groupId>
4+
<artifactId>offers</artifactId>
5+
<version>0.0.1-SNAPSHOT</version>
6+
<packaging>war</packaging>
7+
<build>
8+
<sourceDirectory>src</sourceDirectory>
9+
<plugins>
10+
<plugin>
11+
<artifactId>maven-war-plugin</artifactId>
12+
<version>2.6</version>
13+
<configuration>
14+
<warSourceDirectory>WebContent</warSourceDirectory>
15+
<failOnMissingWebXml>false</failOnMissingWebXml>
16+
</configuration>
17+
</plugin>
18+
<plugin>
19+
<artifactId>maven-compiler-plugin</artifactId>
20+
<version>3.3</version>
21+
<configuration>
22+
<source>1.8</source>
23+
<target>1.8</target>
24+
</configuration>
25+
</plugin>
26+
</plugins>
27+
</build>
28+
<dependencies>
29+
<dependency>
30+
<groupId>org.springframework</groupId>
31+
<artifactId>spring-core</artifactId>
32+
<version>4.2.2.RELEASE</version>
33+
</dependency>
34+
<dependency>
35+
<groupId>org.springframework</groupId>
36+
<artifactId>spring-beans</artifactId>
37+
<version>4.2.2.RELEASE</version>
38+
</dependency>
39+
<dependency>
40+
<groupId>org.springframework</groupId>
41+
<artifactId>spring-context</artifactId>
42+
<version>4.2.2.RELEASE</version>
43+
</dependency>
44+
<dependency>
45+
<groupId>org.springframework</groupId>
46+
<artifactId>spring-jdbc</artifactId>
47+
<version>4.2.2.RELEASE</version>
48+
</dependency>
49+
<dependency>
50+
<groupId>org.springframework</groupId>
51+
<artifactId>spring-web</artifactId>
52+
<version>4.2.2.RELEASE</version>
53+
</dependency>
54+
<dependency>
55+
<groupId>org.springframework</groupId>
56+
<artifactId>spring-webmvc</artifactId>
57+
<version>4.2.2.RELEASE</version>
58+
</dependency>
59+
<dependency>
60+
<groupId>javax.servlet</groupId>
61+
<artifactId>jstl</artifactId>
62+
<version>1.2</version>
63+
</dependency>
64+
<dependency>
65+
<groupId>mysql</groupId>
66+
<artifactId>mysql-connector-java</artifactId>
67+
<version>5.1.37</version>
68+
</dependency>
69+
</dependencies>
70+
</project>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans xmlns="http://www.springframework.org/schema/beans"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
4+
xmlns:jee="http://www.springframework.org/schema/jee"
5+
xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.2.xsd
6+
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
7+
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd">
8+
9+
10+
<context:annotation-config></context:annotation-config>
11+
<context:component-scan base-package="com.runnerdave.spring.web.dao">
12+
</context:component-scan>
13+
<jee:jndi-lookup jndi-name="jdbc/spring-tutorial" id="dataSource"
14+
expected-type="javax.sql.DataSource">
15+
</jee:jndi-lookup>
16+
</beans>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans xmlns="http://www.springframework.org/schema/beans"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
4+
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
5+
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd">
6+
7+
8+
<context:annotation-config></context:annotation-config>
9+
<context:component-scan base-package="com.runnerdave.spring.web.service">
10+
</context:component-scan>
11+
</beans>

0 commit comments

Comments
 (0)