[jboss-cvs] JBossAS SVN: r89771 - in projects/spring-int/trunk: documentation and 13 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jun 3 18:25:41 EDT 2009
Author: marius.bogoevici
Date: 2009-06-03 18:25:41 -0400 (Wed, 03 Jun 2009)
New Revision: 89771
Added:
projects/spring-int/trunk/documentation/
projects/spring-int/trunk/documentation/samples/
projects/spring-int/trunk/documentation/samples/web-scanning/
projects/spring-int/trunk/documentation/samples/web-scanning/pom.xml
projects/spring-int/trunk/documentation/samples/web-scanning/src/
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/business/
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/business/HelloService.java
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/business/HelloServiceImpl.java
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/mvc/
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/mvc/HelloController.java
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/resources/
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/resources/spring-contexts/
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/resources/spring-contexts/spring-business-context.xml
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/jsp/
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/jsp/hello.jsp
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/mvc-config.xml
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/web.xml
projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/index.jsp
Log:
Adding a documentation directory and a scanning sample
Added: projects/spring-int/trunk/documentation/samples/web-scanning/pom.xml
===================================================================
--- projects/spring-int/trunk/documentation/samples/web-scanning/pom.xml (rev 0)
+++ projects/spring-int/trunk/documentation/samples/web-scanning/pom.xml 2009-06-03 22:25:41 UTC (rev 89771)
@@ -0,0 +1,70 @@
+<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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.springdemos</groupId>
+ <artifactId>web-scanning</artifactId>
+ <packaging>war</packaging>
+ <version>1.0</version>
+ <name>Sample classpath-scanning web application</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>2.5.6.SEC01</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>2.5.6.SEC01</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>2.5.6.SEC01</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>2.5.6.SEC01</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>2.5.6.SEC01</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spring-int</groupId>
+ <artifactId>jboss-spring-int-vfs</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>jstl</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>taglibs</groupId>
+ <artifactId>standard</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <finalName>web-scanning</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/business/HelloService.java
===================================================================
--- projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/business/HelloService.java (rev 0)
+++ projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/business/HelloService.java 2009-06-03 22:25:41 UTC (rev 89771)
@@ -0,0 +1,6 @@
+package springdemo.business;
+
+public interface HelloService
+{
+ public String greet(String name);
+}
Added: projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/business/HelloServiceImpl.java
===================================================================
--- projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/business/HelloServiceImpl.java (rev 0)
+++ projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/business/HelloServiceImpl.java 2009-06-03 22:25:41 UTC (rev 89771)
@@ -0,0 +1,21 @@
+package springdemo.business;
+
+import org.springframework.stereotype.Service;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.context.ApplicationContext;
+import org.springframework.beans.BeansException;
+import org.springframework.core.io.Resource;
+import org.springframework.web.context.support.XmlWebApplicationContext;
+
+import java.io.IOException;
+
+ at Service
+public class HelloServiceImpl implements HelloService
+{
+
+ public String greet(String name)
+ {
+ return "Hello, " + name + "!";
+ }
+
+}
Added: projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/mvc/HelloController.java
===================================================================
--- projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/mvc/HelloController.java (rev 0)
+++ projects/spring-int/trunk/documentation/samples/web-scanning/src/main/java/springdemo/mvc/HelloController.java 2009-06-03 22:25:41 UTC (rev 89771)
@@ -0,0 +1,26 @@
+package springdemo.mvc;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import springdemo.business.HelloService;
+
+import java.util.Map;
+import java.util.HashMap;
+
+ at Controller
+public class HelloController
+{
+ @Autowired
+ private HelloService helloService;
+
+ @RequestMapping("/hello")
+ public Map sayHello(@RequestParam("name") String name) {
+ Map model = new HashMap();
+ model.put("message", helloService.greet(name));
+ return model;
+ }
+
+}
Added: projects/spring-int/trunk/documentation/samples/web-scanning/src/main/resources/spring-contexts/spring-business-context.xml
===================================================================
--- projects/spring-int/trunk/documentation/samples/web-scanning/src/main/resources/spring-contexts/spring-business-context.xml (rev 0)
+++ projects/spring-int/trunk/documentation/samples/web-scanning/src/main/resources/spring-contexts/spring-business-context.xml 2009-06-03 22:25:41 UTC (rev 89771)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xsi:schemaLocation=
+ "http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
+
+ <context:component-scan base-package="springdemo.business"/>
+
+
+ <import resource="classpath*:context/resource.xml"/>
+</beans>
\ No newline at end of file
Added: projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/jsp/hello.jsp
===================================================================
--- projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/jsp/hello.jsp (rev 0)
+++ projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/jsp/hello.jsp 2009-06-03 22:25:41 UTC (rev 89771)
@@ -0,0 +1,6 @@
+<%@taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<html>
+<body>
+ <c:out value="${message}"/>
+</body>
+</html>
\ No newline at end of file
Added: projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/mvc-config.xml
===================================================================
--- projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/mvc-config.xml (rev 0)
+++ projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/mvc-config.xml 2009-06-03 22:25:41 UTC (rev 89771)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation=
+ "http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
+
+ <context:component-scan base-package="springdemo.mvc"/>
+
+ <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+ <property name="prefix" value="/WEB-INF/jsp/"/>
+ <property name="suffix" value=".jsp"/>
+ </bean>
+
+</beans>
\ No newline at end of file
Added: projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/web.xml
===================================================================
--- projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/web.xml 2009-06-03 22:25:41 UTC (rev 89771)
@@ -0,0 +1,38 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+ <display-name>Classpath Scanning Spring MVC Web Application</display-name>
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>classpath*:spring-contexts/*.xml</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>contextClass</param-name>
+ <param-value>org.jboss.spring.vfs.context.VFSXmlWebApplicationContext</param-value>
+ </context-param>
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>spring-mvc-servlet</servlet-name>
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+ <init-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>/WEB-INF/mvc-config.xml</param-value>
+ </init-param>
+ <init-param>
+ <param-name>contextClass</param-name>
+ <param-value>org.jboss.spring.vfs.context.VFSXmlWebApplicationContext</param-value>
+ </init-param>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>spring-mvc-servlet</servlet-name>
+ <url-pattern>/spring/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Added: projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/index.jsp
===================================================================
--- projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/index.jsp (rev 0)
+++ projects/spring-int/trunk/documentation/samples/web-scanning/src/main/webapp/index.jsp 2009-06-03 22:25:41 UTC (rev 89771)
@@ -0,0 +1 @@
+<jsp:forward page="/spring/hello?name=Visitor"/>
More information about the jboss-cvs-commits
mailing list