Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
d639763b
Commit
d639763b
authored
Jul 23, 2013
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another attempt at making the ui sample work
parent
db27620c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
19 deletions
+15
-19
pom.xml
pom.xml
+1
-0
ui.groovy
spring-cli/samples/ui.groovy
+14
-19
No files found.
pom.xml
View file @
d639763b
...
@@ -205,6 +205,7 @@
...
@@ -205,6 +205,7 @@
<systemPropertyVariables>
<systemPropertyVariables>
<java.security.egd>
file:/dev/./urandom
</java.security.egd>
<java.security.egd>
file:/dev/./urandom
</java.security.egd>
</systemPropertyVariables>
</systemPropertyVariables>
<argLine>
-Xmx1024m -XX:MaxPermSize=256m
</argLine>
</configuration>
</configuration>
</plugin>
</plugin>
<plugin>
<plugin>
...
...
spring-cli/samples/ui.groovy
View file @
d639763b
...
@@ -11,30 +11,25 @@ class Example {
...
@@ -11,30 +11,25 @@ class Example {
model
.
putAll
([
title:
"My Page"
,
date:
new
Date
(),
message:
"Hello World"
])
model
.
putAll
([
title:
"My Page"
,
date:
new
Date
(),
message:
"Hello World"
])
return
"home"
;
return
"home"
;
}
}
}
}
import
javax.servlet.http.HttpServletRequest
import
javax.servlet.http.HttpServletResponse
@Configuration
@Configuration
@Log
@Log
class
MvcConfiguration
extends
WebMvcConfigurerAdapter
{
class
MvcConfiguration
extends
WebMvcConfigurerAdapter
{
@Override
@Override
void
addInterceptors
(
InterceptorRegistry
registry
)
{
void
addInterceptors
(
InterceptorRegistry
registry
)
{
log
.
info
(
"Registering interceptor"
)
log
.
info
"Registering interceptor"
registry
.
addInterceptor
(
interceptor
())
registry
.
addInterceptor
(
interceptor
())
}
}
@Bean
@Bean
HandlerInterceptor
interceptor
()
{
HandlerInterceptor
interceptor
()
{
log
.
info
(
"Creating interceptor"
)
log
.
info
"Creating interceptor"
new
HandlerInterceptorAdapter
()
{
[
@Override
postHandle:
{
request
,
response
,
handler
,
mav
->
void
postHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
ModelAndView
mav
)
{
log
.
info
"Intercepted: model="
+
mav
.
model
log
.
info
(
"Model: "
+
mav
.
model
)
}
}
]
as
HandlerInterceptorAdapter
}
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment