Skip to content

Commit 4e90cdf

Browse files
committed
docs: link to the example request map domain class in the request mappings section (#1179)
1 parent b6b79ea commit 4e90cdf

File tree

1 file changed

+2
-33
lines changed

1 file changed

+2
-33
lines changed

plugin-core/docs/src/docs/requestMappings/requestmapInstances.adoc

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -36,41 +36,10 @@ To use database-backed url security mappings, use the following configuration:
3636
.Listing {counter:listing}. Configuring database-backed url security rules
3737
----
3838
grails.plugin.springsecurity.securityConfigType = 'Requestmap'
39-
grails.plugin.springsecurity.requestMap.className = 'com.foo.bar.SecurityMapping'
39+
grails.plugin.springsecurity.requestMap.className = 'com.mycompany.myapp.SecurityMapping'
4040
----
4141

42-
An example request map domain class:
43-
[source, groovy]
44-
.Listing {counter:listing}. An example request map domain class
45-
----
46-
package com.foo.bar
47-
48-
import org.springframework.http.HttpMethod
49-
50-
import groovy.transform.EqualsAndHashCode
51-
import groovy.transform.ToString
52-
53-
@EqualsAndHashCode(includes=['configAttribute', 'httpMethod', 'url'])
54-
@ToString(includes=['configAttribute', 'httpMethod', 'url'], cache = true, includeNames = true, includePackage = false)
55-
class SecurityMapping implements Serializable {
56-
57-
private static final long serialVersionUID = 1
58-
59-
String configAttribute
60-
HttpMethod httpMethod
61-
String url
62-
63-
static constraints = {
64-
configAttribute(nullable: false, blank: false)
65-
httpMethod(nullable: true)
66-
url(nullable: false, blank: false, unique: 'httpMethod')
67-
}
68-
69-
static mapping = {
70-
cache(true)
71-
}
72-
}
73-
----
42+
See <<requestmapClass>> for an example request map domain class.
7443

7544
You create request map entries as you create entries in any Grails domain class:
7645

0 commit comments

Comments
 (0)