Java Code Examples for org.springframework.boot.autoconfigure.web.ResourceProperties

The following examples show how to use org.springframework.boot.autoconfigure.web.ResourceProperties. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public ErrorHandlerConfiguration(ServerProperties serverProperties,
                                 ResourceProperties resourceProperties,
                                 ObjectProvider<List<ViewResolver>> viewResolversProvider,
                                 ServerCodecConfigurer serverCodecConfigurer,
                                 ApplicationContext applicationContext) {
	this.serverProperties = serverProperties;
	this.applicationContext = applicationContext;
	this.resourceProperties = resourceProperties;
	this.viewResolvers = viewResolversProvider.getIfAvailable(Collections::emptyList);
	this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 2
Source Project: influx-proxy   Source File: WebExceptionConfig.java    License: Apache License 2.0 5 votes vote down vote up
public WebExceptionConfig(ServerProperties serverProperties,
                                     ResourceProperties resourceProperties,
                                     ObjectProvider<ViewResolver> viewResolversProvider,
                                     ServerCodecConfigurer serverCodecConfigurer,
                                     ApplicationContext applicationContext) {
    this.serverProperties = serverProperties;
    this.applicationContext = applicationContext;
    this.resourceProperties = resourceProperties;
    this.viewResolvers = viewResolversProvider.orderedStream()
            .collect(Collectors.toList());
    this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 3
public GlobalErrorWebFluxConfiguration(
        ApplicationContext applicationContext,
        ResourceProperties resourceProperties,
        List<ViewResolver> viewResolvers,
        ServerCodecConfigurer serverCodecConfigurer
) {
    this.applicationContext = applicationContext;
    this.resourceProperties = resourceProperties;
    this.viewResolvers = viewResolvers;
    this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 4
Source Project: open-capacity-platform   Source File: ErrorHandlerConfig.java    License: Apache License 2.0 5 votes vote down vote up
public ErrorHandlerConfig(ServerProperties serverProperties,
                                 ResourceProperties resourceProperties,
                                 ObjectProvider<List<ViewResolver>> viewResolversProvider,
                                 ServerCodecConfigurer serverCodecConfigurer,
                                 ApplicationContext applicationContext) {
    this.serverProperties = serverProperties;
    this.applicationContext = applicationContext;
    this.resourceProperties = resourceProperties;
    this.viewResolvers = viewResolversProvider.getIfAvailable(Collections::emptyList);
    this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 5
public CustomErrorWebFluxAutoConfiguration(ServerProperties serverProperties,
                                           ResourceProperties resourceProperties,
                                           ObjectProvider<List<ViewResolver>> viewResolversProvider,
                                           ServerCodecConfigurer serverCodecConfigurer,
                                           ApplicationContext applicationContext) {
    this.serverProperties = serverProperties;
    this.applicationContext = applicationContext;
    this.resourceProperties = resourceProperties;
    this.viewResolvers = viewResolversProvider.getIfAvailable(Collections::emptyList);
    this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 6
Source Project: SpringBlade   Source File: ErrorHandlerConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
public ErrorHandlerConfiguration(ServerProperties serverProperties,
								 ResourceProperties resourceProperties,
								 ObjectProvider<List<ViewResolver>> viewResolversProvider,
								 ServerCodecConfigurer serverCodecConfigurer,
								 ApplicationContext applicationContext) {
	this.serverProperties = serverProperties;
	this.applicationContext = applicationContext;
	this.resourceProperties = resourceProperties;
	this.viewResolvers = viewResolversProvider.getIfAvailable(Collections::emptyList);
	this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 7
Source Project: fw-spring-cloud   Source File: FwGatewayErrorConfigure.java    License: Apache License 2.0 5 votes vote down vote up
public FwGatewayErrorConfigure(ServerProperties serverProperties,
                                 ResourceProperties resourceProperties,
                                 ObjectProvider<List<ViewResolver>> viewResolversProvider,
                                 ServerCodecConfigurer serverCodecConfigurer,
                                 ApplicationContext applicationContext) {
    this.serverProperties = serverProperties;
    this.applicationContext = applicationContext;
    this.resourceProperties = resourceProperties;
    this.viewResolvers = viewResolversProvider.getIfAvailable(Collections::emptyList);
    this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 8
public ErrorHandlerConfiguration(ServerProperties serverProperties,
                                 ResourceProperties resourceProperties,
                                 ObjectProvider<List<ViewResolver>> viewResolversProvider,
                                 ServerCodecConfigurer serverCodecConfigurer,
                                 ApplicationContext applicationContext) {
    this.serverProperties = serverProperties;
    this.applicationContext = applicationContext;
    this.resourceProperties = resourceProperties;
    this.viewResolvers = viewResolversProvider.getIfAvailable(Collections::emptyList);
    this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 9
public ErrorHandlerConfiguration(ServerProperties serverProperties,
                                 ResourceProperties resourceProperties,
                                 ObjectProvider<List<ViewResolver>> viewResolversProvider,
                                 ServerCodecConfigurer serverCodecConfigurer,
                                 ApplicationContext applicationContext) {
    this.serverProperties = serverProperties;
    this.applicationContext = applicationContext;
    this.resourceProperties = resourceProperties;
    this.viewResolvers = viewResolversProvider.getIfAvailable(Collections::emptyList);
    this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 10
Source Project: sophia_scaffolding   Source File: ErrorHandler.java    License: Apache License 2.0 5 votes vote down vote up
public ErrorHandler(ServerProperties serverProperties,
                    ResourceProperties resourceProperties,
                    ObjectProvider<List<ViewResolver>> viewResolversProvider,
                    ServerCodecConfigurer serverCodecConfigurer,
                    ApplicationContext applicationContext) {
    this.serverProperties = serverProperties;
    this.applicationContext = applicationContext;
    this.resourceProperties = resourceProperties;
    this.viewResolvers = viewResolversProvider.getIfAvailable(Collections::emptyList);
    this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 11
Source Project: sophia_scaffolding   Source File: ErrorHandler.java    License: Apache License 2.0 5 votes vote down vote up
public ErrorHandler(ServerProperties serverProperties,
                    ResourceProperties resourceProperties,
                    ObjectProvider<List<ViewResolver>> viewResolversProvider,
                    ServerCodecConfigurer serverCodecConfigurer,
                    ApplicationContext applicationContext) {
    this.serverProperties = serverProperties;
    this.applicationContext = applicationContext;
    this.resourceProperties = resourceProperties;
    this.viewResolvers = viewResolversProvider.getIfAvailable(Collections::emptyList);
    this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 12
Source Project: soul   Source File: ErrorHandlerConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Instantiates a new Error handler configuration.
 *
 * @param serverProperties      the server properties
 * @param resourceProperties    the resource properties
 * @param viewResolversProvider the view resolvers provider
 * @param serverCodecConfigurer the server codec configurer
 * @param applicationContext    the application context
 */
public ErrorHandlerConfiguration(final ServerProperties serverProperties,
                                 final ResourceProperties resourceProperties,
                                 final ObjectProvider<List<ViewResolver>> viewResolversProvider,
                                 final ServerCodecConfigurer serverCodecConfigurer,
                                 final ApplicationContext applicationContext) {
    this.serverProperties = serverProperties;
    this.applicationContext = applicationContext;
    this.resourceProperties = resourceProperties;
    this.viewResolvers = viewResolversProvider.getIfAvailable(Collections::emptyList);
    this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 13
public ErrorHandlerConfiguration(ServerProperties serverProperties,
                                 ResourceProperties resourceProperties,
                                 ObjectProvider<List<ViewResolver>> viewResolversProvider,
                                 ServerCodecConfigurer serverCodecConfigurer,
                                 ApplicationContext applicationContext) {
	this.serverProperties = serverProperties;
	this.applicationContext = applicationContext;
	this.resourceProperties = resourceProperties;
	this.viewResolvers = viewResolversProvider.getIfAvailable(Collections::emptyList);
	this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 14
Source Project: JetfireCloud   Source File: ExceptionAutoConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
public ExceptionAutoConfiguration(ServerProperties serverProperties,
                                  ResourceProperties resourceProperties,
                                  ObjectProvider<List<ViewResolver>> viewResolversProvider,
                                  ServerCodecConfigurer serverCodecConfigurer,
                                  ApplicationContext applicationContext) {
    this.serverProperties = serverProperties;
    this.applicationContext = applicationContext;
    this.resourceProperties = resourceProperties;
    this.viewResolvers = viewResolversProvider
            .getIfAvailable(() -> Collections.emptyList());
    this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 15
Source Project: SpringCloud   Source File: ExceptionAutoConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
public ExceptionAutoConfiguration(ServerProperties serverProperties,
                                  ResourceProperties resourceProperties,
                                  ObjectProvider<List<ViewResolver>> viewResolversProvider,
                                  ServerCodecConfigurer serverCodecConfigurer,
                                  ApplicationContext applicationContext) {
    this.serverProperties = serverProperties;
    this.applicationContext = applicationContext;
    this.resourceProperties = resourceProperties;
    this.viewResolvers = viewResolversProvider
            .getIfAvailable(() -> Collections.emptyList());
    this.serverCodecConfigurer = serverCodecConfigurer;
}
 
Example 16
private DefaultErrorWebExceptionHandler errorHandler(GenericApplicationContext context) {
	context.registerBean(ErrorAttributes.class, () -> new DefaultErrorAttributes());
	context.registerBean(ErrorProperties.class, () -> new ErrorProperties());
	context.registerBean(ResourceProperties.class, () -> new ResourceProperties());
	DefaultErrorWebExceptionHandler handler = new DefaultErrorWebExceptionHandler(
			context.getBean(ErrorAttributes.class), context.getBean(ResourceProperties.class),
			context.getBean(ErrorProperties.class), context);
	ServerCodecConfigurer codecs = ServerCodecConfigurer.create();
	handler.setMessageWriters(codecs.getWriters());
	handler.setMessageReaders(codecs.getReaders());
	return handler;
}
 
Example 17
public GlobalExceptionHandler(ErrorAttributes errorAttributes, ResourceProperties resourceProperties,
                              ErrorProperties errorProperties, ApplicationContext applicationContext) {
	super(errorAttributes, resourceProperties, errorProperties, applicationContext);
}
 
Example 18
public GlobalErrorWebExceptionHandler(ErrorAttributes errorAttributes, ResourceProperties resourceProperties, ApplicationContext applicationContext) {
    super(errorAttributes, resourceProperties, applicationContext);
}
 
Example 19
public JsonExceptionHandler(ErrorAttributes errorAttributes, ResourceProperties resourceProperties,
		ErrorProperties errorProperties, ApplicationContext applicationContext) {
	super(errorAttributes, resourceProperties, errorProperties, applicationContext);
}
 
Example 20
Source Project: FEBS-Cloud   Source File: FebsGatewayExceptionHandler.java    License: Apache License 2.0 4 votes vote down vote up
public FebsGatewayExceptionHandler(ErrorAttributes errorAttributes, ResourceProperties resourceProperties,
                                   ErrorProperties errorProperties, ApplicationContext applicationContext) {
    super(errorAttributes, resourceProperties, errorProperties, applicationContext);
}
 
Example 21
public JsonErrorWebExceptionHandler(ErrorAttributes errorAttributes, ResourceProperties resourceProperties,
                                    ErrorProperties errorProperties, ApplicationContext applicationContext) {
    super(errorAttributes, resourceProperties, errorProperties, applicationContext);
}
 
Example 22
Source Project: SpringBlade   Source File: ErrorExceptionHandler.java    License: Apache License 2.0 4 votes vote down vote up
public ErrorExceptionHandler(ErrorAttributes errorAttributes, ResourceProperties resourceProperties,
							 ErrorProperties errorProperties, ApplicationContext applicationContext) {
	super(errorAttributes, resourceProperties, errorProperties, applicationContext);
}
 
Example 23
Source Project: fw-spring-cloud   Source File: FwGatewayExceptionHandler.java    License: Apache License 2.0 4 votes vote down vote up
public FwGatewayExceptionHandler(ErrorAttributes errorAttributes, ResourceProperties resourceProperties,
                                 ErrorProperties errorProperties, ApplicationContext applicationContext) {
    super(errorAttributes, resourceProperties, errorProperties, applicationContext);
}
 
Example 24
public JsonExceptionHandler(ErrorAttributes errorAttributes, ResourceProperties resourceProperties,
                            ErrorProperties errorProperties, ApplicationContext applicationContext) {
    super(errorAttributes, resourceProperties, errorProperties, applicationContext);
}
 
Example 25
Source Project: sophia_scaffolding   Source File: JsonExceptionHandler.java    License: Apache License 2.0 4 votes vote down vote up
public JsonExceptionHandler(ErrorAttributes errorAttributes, ResourceProperties resourceProperties,
                            ErrorProperties errorProperties, ApplicationContext applicationContext) {
    super(errorAttributes, resourceProperties, errorProperties, applicationContext);
}
 
Example 26
Source Project: sophia_scaffolding   Source File: JsonExceptionHandler.java    License: Apache License 2.0 4 votes vote down vote up
public JsonExceptionHandler(ErrorAttributes errorAttributes, ResourceProperties resourceProperties,
                            ErrorProperties errorProperties, ApplicationContext applicationContext) {
    super(errorAttributes, resourceProperties, errorProperties, applicationContext);
}
 
Example 27
Source Project: sophia_scaffolding   Source File: JsonExceptionHandler.java    License: Apache License 2.0 4 votes vote down vote up
public JsonExceptionHandler(ErrorAttributes errorAttributes, ResourceProperties resourceProperties,
                            ErrorProperties errorProperties, ApplicationContext applicationContext) {
    super(errorAttributes, resourceProperties, errorProperties, applicationContext);
}
 
Example 28
public GlobalExceptionHandler(ErrorAttributes errorAttributes, ResourceProperties resourceProperties,
                              ErrorProperties errorProperties, ApplicationContext applicationContext) {
	super(errorAttributes, resourceProperties, errorProperties, applicationContext);
}
 
Example 29
Source Project: spring-fu   Source File: ServletWebServerInitializer.java    License: Apache License 2.0 4 votes vote down vote up
public ServletWebServerInitializer(ServerProperties serverProperties, WebMvcProperties webMvcProperties, ResourceProperties resourceProperties) {
	this.serverProperties = serverProperties;
	this.webMvcProperties = webMvcProperties;
	this.resourceProperties = resourceProperties;
}
 
Example 30
Source Project: spring-fu   Source File: ReactiveWebServerInitializer.java    License: Apache License 2.0 4 votes vote down vote up
public ReactiveWebServerInitializer(ServerProperties serverProperties, ResourceProperties resourceProperties, WebFluxProperties webFluxProperties, ConfigurableReactiveWebServerFactory serverFactory) {
	this.serverProperties = serverProperties;
	this.resourceProperties = resourceProperties;
	this.webFluxProperties = webFluxProperties;
	this.serverFactory = serverFactory;
}