Skip to content

Commit

Permalink
Merging 0.4 from bclozel
Browse files Browse the repository at this point in the history
  • Loading branch information
bradleydwyer committed Feb 12, 2012
2 parents 2b4f6d9 + e427031 commit 43b5984
Show file tree
Hide file tree
Showing 8 changed files with 707 additions and 683 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,3 +3,4 @@
.settings/
target/
.idea
*.iml
20 changes: 9 additions & 11 deletions README.md
Expand Up @@ -4,7 +4,7 @@ SpringMVC Router
Route mapping with SpringMVC Router
-----------------------------------

Spring MVC 3.0 [handles requests mapping](http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/mvc.html) with `AnnotationMethodHandlerAdapter` and `DefaultAnnotationHandlerMapping` beans (that's the "out-of-the-box" configuration that comes with your springmvc application).
Spring MVC 3.1 [handles requests mapping](http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/mvc.html) with `AnnotationMethodHandlerAdapter` and `DefaultAnnotationHandlerMapping` beans (that's the "out-of-the-box" configuration that comes with your springmvc application).

But you may want to use a request Router for your application:

Expand All @@ -29,7 +29,7 @@ Configuring the SpringMVC Router for your project

Warning: **this project is not hosted yet on any public maven repository** - so before adding the dependency to your pom.xml, you have to upload it on your maven repo.

Other Warning: **this project currently depends on Spring 3.0.4.RELEASE ++**, and is not using version range in its POM [because of this bug](https://jira.springsource.org/browse/SPR-7287) - your project needs these dependencies.
Other Warning: **this project currently depends on Spring 3.1.0.RELEASE ++**, and is not using version range in its POM [because of this bug](https://jira.springsource.org/browse/SPR-7287) - your project needs these dependencies.



Expand All @@ -54,7 +54,7 @@ Other Warning: **this project currently depends on Spring 3.0.4.RELEASE ++**, an
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springmvc-router</artifactId>
<version>0.3</version>
<version>0.4</version>
</dependency>
...
</dependencies>
Expand All @@ -73,11 +73,11 @@ in your *-servlet.xml file, add the following beans:
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">

<!--
Enable bean declaration by annotations, update base package according to your project
Expand Down Expand Up @@ -105,7 +105,7 @@ in your *-servlet.xml file, add the following beans:
RouterHandlerMapping loads routes configuration from a file.
Router adapted from Play! Framework.
@see http://www.playframework.org/documentation/1.1RC1/routes#syntax
@see http://www.playframework.org/documentation/1.2.4/routes#syntax
for route configuration syntax.
Example:
GET /home PageController.showPage(id:'home')
Expand Down Expand Up @@ -133,7 +133,7 @@ The router maps HTTP request to a specific action (i.e. a public method of a Con

### Get your first Controller ready!

Controllers can use [Spring MVC annotations and conventions](http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/mvc.html) - only the `@RequestParam` annotation is made useless.
Controllers can use [Spring MVC annotations and conventions](http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/mvc.html) - only the `@RequestParam` annotation is made useless.


@Controller
Expand All @@ -160,7 +160,7 @@ Controllers can use [Spring MVC annotations and conventions](http://static.sprin
GET /hello/{<[a-zA-Z]+>name} helloController.sayHelloTo


For more details on routes syntax, [check out the PlayFramework documentation](http://www.playframework.org/documentation/1.2.1/routes).
For more details on routes syntax, [check out the PlayFramework documentation](http://www.playframework.org/documentation/1.2.4/routes).


View Integration
Expand Down Expand Up @@ -226,8 +226,6 @@ Then use the #route directive within your .vm file:
Tools
-----

Routing requests to actions is one thing. But refactoring routes can be a real pain if all your URLs are hard coded in your template views. Reverse routing is the solution.


### Embedded resources maven plugin

Expand Down
28 changes: 17 additions & 11 deletions pom.xml
Expand Up @@ -4,21 +4,21 @@
<groupId>org.springframework</groupId>
<artifactId>springmvc-router</artifactId>
<packaging>jar</packaging>
<version>0.4.0-SNAPSHOT</version>
<version>0.4</version>
<name>springmvc-router</name>
<description></description>
<url>http://bitbucket.org/bclozel/springmvc-router/</url>
<url>https://github.com/bclozel/springmvc-router/</url>

<properties>
<junit.version>4.7</junit.version>
<spring-version>3.0.5.RELEASE</spring-version>
<spring-security-version>3.0.5.RELEASE</spring-security-version>
<cglib-version>2.2</cglib-version>
<junit.version>4.10</junit.version>
<spring-version>3.1.0.RELEASE</spring-version>
<spring-security-version>3.1.0.RELEASE</spring-security-version>
<cglib-version>2.2.2</cglib-version>
<apache-commons-io-version>1.3.2</apache-commons-io-version>
<velocity-version>1.7</velocity-version>
<javassist-version>3.9.0.GA</javassist-version>
<javassist-version>3.12.1.GA</javassist-version>
<log4j.version>1.2.16</log4j.version>
<slf4j.version>1.6.0</slf4j.version>
<slf4j.version>1.6.4</slf4j.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -50,12 +50,12 @@
</developer>
</developers>
<scm>
<connection>scm:hg:https://bitbucket.org/bclozel/springmvc-router/</connection>
<url>http://bitbucket.org/bclozel/springmvc-router/src/</url>
<connection>scm:git:https://github.com/bclozel/springmvc-router.git</connection>
<url>https://github.com/bclozel/springmvc-router</url>
</scm>
<issueManagement>
<system>Spring MVC Router issue tracker</system>
<url>https://bitbucket.org/bclozel/springmvc-router/issues</url>
<url>https://github.com/bclozel/springmvc-router/issues</url>
</issueManagement>

<dependencies>
Expand Down Expand Up @@ -240,6 +240,12 @@
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>maven-europe</id>
<name>Maven Europe Mirror</name>
<layout>default</layout>
<url>http://uk.maven.org/maven2/</url>
</repository>
</repositories>

</project>
55 changes: 30 additions & 25 deletions springmvc-router.iml
Expand Up @@ -3,48 +3,53 @@
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/test-annotations" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target/classes" />
<excludeFolder url="file://$MODULE_DIR$/target/maven-archiver" />
<excludeFolder url="file://$MODULE_DIR$/target/surefire" />
<excludeFolder url="file://$MODULE_DIR$/target/surefire-reports" />
<excludeFolder url="file://$MODULE_DIR$/target/test-classes" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:3.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:3.1.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-asm:3.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:3.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:3.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-asm:3.1.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:3.1.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:3.1.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:3.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:3.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:3.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:3.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:3.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.6.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:3.1.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:3.1.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:3.1.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:3.1.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:3.1.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.6.4" level="project" />
<orderEntry type="library" name="Maven: log4j:log4j:1.2.16" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.6.0" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.6.4" level="project" />
<orderEntry type="library" name="Maven: jregex:jregex:1.2_01" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-io:1.3.2" level="project" />
<orderEntry type="library" name="Maven: javassist:javassist:3.9.0.GA" level="project" />
<orderEntry type="library" name="Maven: javassist:javassist:3.12.1.GA" level="project" />
<orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
<orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.7" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.4" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:servlet-api:2.5" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:3.0.5.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.security:spring-security-core:3.0.5.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-tx:3.0.3.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.aspectj:aspectjrt:1.6.8" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.aspectj:aspectjweaver:1.6.8" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.security:spring-security-config:3.0.5.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.security:spring-security-acl:3.0.5.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-jdbc:3.0.3.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.security:spring-security-web:3.0.5.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: cglib:cglib-nodep:2.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.7" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:3.1.0.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.security:spring-security-core:3.1.0.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.security:spring-security-crypto:3.1.0.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.security:spring-security-config:3.1.0.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.security:spring-security-acl:3.1.0.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-tx:3.0.6.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-jdbc:3.0.6.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.security:spring-security-web:3.1.0.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: cglib:cglib-nodep:2.2.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.10" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
</component>
</module>

0 comments on commit 43b5984

Please sign in to comment.