Merge branch 'Feature/Add_Rest_Api_with_Java_client' of https://github.com/bsinno/hawkbit.git into Feature/Add_Rest_Api_with_Java_client
Conflicts: hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/web/ResourceControllerAutoConfiguration.java Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com>
This commit is contained in:
@@ -8,12 +8,20 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.autoconfigure.web;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.eclipse.hawkbit.ddi.EnableDdiApi;
|
||||
import org.eclipse.hawkbit.mgmt.annotation.EnableMgmtApi;
|
||||
import org.eclipse.hawkbit.rest.util.FilterHttpResponse;
|
||||
import org.eclipse.hawkbit.rest.util.HttpResponseFactoryBean;
|
||||
import org.eclipse.hawkbit.rest.util.RequestResponseContextHolder;
|
||||
import org.eclipse.hawkbit.system.annotation.EnableSystemApi;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
|
||||
/**
|
||||
* Auto-Configuration for enabling the REST-Resources.
|
||||
@@ -24,4 +32,29 @@ import org.springframework.context.annotation.Import;
|
||||
@Import({ EnableDdiApi.class, EnableMgmtApi.class, EnableSystemApi.class })
|
||||
public class ResourceControllerAutoConfiguration {
|
||||
|
||||
/**
|
||||
* Create filter for {@link HttpServletResponse}.
|
||||
*/
|
||||
@Bean
|
||||
public FilterHttpResponse filterHttpResponse() {
|
||||
return new FilterHttpResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create factory bean for {@link HttpServletResponse}.
|
||||
*/
|
||||
@Bean
|
||||
public HttpResponseFactoryBean httpResponseFactoryBean() {
|
||||
return new HttpResponseFactoryBean();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create factory bean for {@link HttpServletResponse}.
|
||||
*/
|
||||
@Bean
|
||||
@Scope(value = WebApplicationContext.SCOPE_REQUEST)
|
||||
public RequestResponseContextHolder requestResponseContextHolder() {
|
||||
return new RequestResponseContextHolder();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user