Oct 13th, 2012, 05:07 PM
Creating a Custom handlermapper, What handlermapping does spring mvc use?
In my spring mvc application, I am using annotations on the controllers.
What handlermapping implementation will map my urls to controller methods then? (I use requestmapping("/home")
As a simple test to learn how to make my own handlermapper, how could I create a handler mapper that would do the following:
If a request comes in for the url "/myblog", I want to run the method in BlogController#index.
How would I do this?
Note: The goal for me is to learn how to create a handler mapper that will work dynamically (reading values from the db), so I can't hard code urls to controllers.
Oct 15th, 2012, 01:08 AM
Depends on the spring version. 3.1 uses the RequestMappingHandlerMapping < 3.1 use DefaultAnnotationHandlerMapping... This is all explained in the reference guide so I suggest a read of that.
Regarding database driven mapping information use the forum search as that has been asked before.
Oct 15th, 2012, 06:40 PM
I did find a post where you were involved, but I'm nto sure if it was 3.1 or not.
Originally Posted by Marten Deinum
I'll try and find it again.
Oct 24th, 2012, 08:59 PM
Marten, do you know where that post is?
Tags for this Thread