| [[requestmapClass]] |
| === Requestmap Class |
| |
| Optionally, use this class to store request mapping entries in the database instead of defining them with annotations or in `application.groovy`. This option makes the class configurable at runtime; you can add, remove and edit rules without restarting your application. |
| |
| .Requestmap class configuration options |
| [cols="30,30,40"] |
| |==================== |
| | *Property* | *Default Value* | *Meaning* |
| |
| |requestMap.className |
| |_none_ |
| |requestmap class name |
| |
| |requestMap.urlField |
| |"`url`" |
| |URL pattern property name |
| |
| |requestMap.configAttributeField |
| |"`configAttribute`" |
| |authority pattern property name |
| |
| |requestMap.httpMethodField |
| |"`httpMethod`" |
| |HTTP method property name (optional, does not have to exist in the class if you don't require URL/method security) |
| |==================== |
| |
| Assuming you choose `com.mycompany.myapp` as your package, and `Requestmap` as your class name, you'll generate this class: |
| |
| [source, groovy] |
| .`Requestmap.groovy` |
| ---- |
| include::../code/s2-quickstart-requestmap/grails-app/domain/com/mycompany/myapp/RequestMap.groovy[] |
| ---- |
| |
| To use Requestmap entries to guard URLs, see <<requestmapInstances>>. |