mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Fix interfaces in groovy configuration
This commit is contained in:
parent
4ecfbf68bf
commit
db27620c6e
@ -1,5 +1,7 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
|
import groovy.util.logging.Log
|
||||||
|
|
||||||
@Grab("org.thymeleaf:thymeleaf-spring3:2.0.16")
|
@Grab("org.thymeleaf:thymeleaf-spring3:2.0.16")
|
||||||
@Controller
|
@Controller
|
||||||
class Example {
|
class Example {
|
||||||
@ -12,23 +14,26 @@ class Example {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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(def registry) {
|
void addInterceptors(InterceptorRegistry registry) {
|
||||||
log.info("Registering temporary file interceptor")
|
log.info("Registering interceptor")
|
||||||
registry.addInterceptor(temporaryFileInterceptor())
|
registry.addInterceptor(interceptor())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
HandlerInterceptor temporaryFileInterceptor() {
|
HandlerInterceptor interceptor() {
|
||||||
log.info("Creating temporary file interceptor")
|
log.info("Creating interceptor")
|
||||||
new HandlerInterceptorAdapter() {
|
new HandlerInterceptorAdapter() {
|
||||||
@Override
|
@Override
|
||||||
postHandle(def request, def response, def handler, ModelAndView mav) {
|
void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView mav) {
|
||||||
log.info("Model: " + model)
|
log.info("Model: " + mav.model)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,6 @@ import org.apache.ivy.util.FileUtil;
|
|||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.springframework.cli.command.RunCommand;
|
import org.springframework.cli.command.RunCommand;
|
||||||
|
|
||||||
@ -137,7 +136,6 @@ public class SampleIntegrationTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
|
||||||
public void uiSample() throws Exception {
|
public void uiSample() throws Exception {
|
||||||
|
|
||||||
// FIXME Failing on OSX
|
// FIXME Failing on OSX
|
||||||
|
Loading…
Reference in New Issue
Block a user