@ -162,18 +162,18 @@ class CloudFoundryMvcWebEndpointIntegrationTests {
static class CloudFoundryMvcConfiguration {
@Bean
public CloudFoundrySecurityInterceptor interceptor ( ) {
CloudFoundrySecurityInterceptor interceptor ( ) {
return new CloudFoundrySecurityInterceptor ( tokenValidator , securityService , "app-id" ) ;
}
@Bean
public EndpointMediaTypes EndpointMediaTypes ( ) {
EndpointMediaTypes EndpointMediaTypes ( ) {
return new EndpointMediaTypes ( Collections . singletonList ( "application/json" ) ,
Collections . singletonList ( "application/json" ) ) ;
}
@Bean
public CloudFoundryWebEndpointServletHandlerMapping cloudFoundryWebEndpointServletHandlerMapping (
CloudFoundryWebEndpointServletHandlerMapping cloudFoundryWebEndpointServletHandlerMapping (
WebEndpointDiscoverer webEndpointDiscoverer , EndpointMediaTypes endpointMediaTypes ,
CloudFoundrySecurityInterceptor interceptor ) {
CorsConfiguration corsConfiguration = new CorsConfiguration ( ) ;
@ -185,7 +185,7 @@ class CloudFoundryMvcWebEndpointIntegrationTests {
}
@Bean
public WebEndpointDiscoverer webEndpointDiscoverer ( ApplicationContext applicationContext ,
WebEndpointDiscoverer webEndpointDiscoverer ( ApplicationContext applicationContext ,
EndpointMediaTypes endpointMediaTypes ) {
ParameterValueMapper parameterMapper = new ConversionServiceParameterValueMapper (
DefaultConversionService . getSharedInstance ( ) ) ;
@ -194,17 +194,17 @@ class CloudFoundryMvcWebEndpointIntegrationTests {
}
@Bean
public EndpointDelegate endpointDelegate ( ) {
EndpointDelegate endpointDelegate ( ) {
return mock ( EndpointDelegate . class ) ;
}
@Bean
public TomcatServletWebServerFactory tomcat ( ) {
TomcatServletWebServerFactory tomcat ( ) {
return new TomcatServletWebServerFactory ( 0 ) ;
}
@Bean
public DispatcherServlet dispatcherServlet ( ) {
DispatcherServlet dispatcherServlet ( ) {
return new DispatcherServlet ( ) ;
}
@ -220,17 +220,17 @@ class CloudFoundryMvcWebEndpointIntegrationTests {
}
@ReadOperation
public Map < String , Object > readAll ( ) {
Map < String , Object > readAll ( ) {
return Collections . singletonMap ( "All" , true ) ;
}
@ReadOperation
public Map < String , Object > readPart ( @Selector String part ) {
Map < String , Object > readPart ( @Selector String part ) {
return Collections . singletonMap ( "part" , part ) ;
}
@WriteOperation
public void write ( String foo , String bar ) {
void write ( String foo , String bar ) {
this . endpointDelegate . write ( foo , bar ) ;
}
@ -240,7 +240,7 @@ class CloudFoundryMvcWebEndpointIntegrationTests {
static class TestEnvEndpoint {
@ReadOperation
public Map < String , Object > readAll ( ) {
Map < String , Object > readAll ( ) {
return Collections . singletonMap ( "All" , true ) ;
}
@ -250,7 +250,7 @@ class CloudFoundryMvcWebEndpointIntegrationTests {
static class TestInfoEndpoint {
@ReadOperation
public Map < String , Object > readAll ( ) {
Map < String , Object > readAll ( ) {
return Collections . singletonMap ( "All" , true ) ;
}
@ -258,26 +258,26 @@ class CloudFoundryMvcWebEndpointIntegrationTests {
@Configuration ( proxyBeanMethods = false )
@Import ( CloudFoundryMvcConfiguration . class )
protected static class TestEndpointConfiguration {
static class TestEndpointConfiguration {
@Bean
public TestEndpoint testEndpoint ( EndpointDelegate endpointDelegate ) {
TestEndpoint testEndpoint ( EndpointDelegate endpointDelegate ) {
return new TestEndpoint ( endpointDelegate ) ;
}
@Bean
public TestInfoEndpoint testInfoEnvEndpoint ( ) {
TestInfoEndpoint testInfoEnvEndpoint ( ) {
return new TestInfoEndpoint ( ) ;
}
@Bean
public TestEnvEndpoint testEnvEndpoint ( ) {
TestEnvEndpoint testEnvEndpoint ( ) {
return new TestEnvEndpoint ( ) ;
}
}
public interface EndpointDelegate {
interface EndpointDelegate {
void write ( ) ;