Modular hawkBit (#378)

* Cleaned up component scan
* More flexibility for hawkBit micro services
* Introduce spring boot starters
* Eclipse Jetty as hawkBit default
* Fixed links as prep for wiki removal

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2016-12-13 12:29:21 +01:00
committed by GitHub
parent 63adbd0298
commit 92dd6a1a0e
178 changed files with 981 additions and 585 deletions

View File

@@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.rest.configuration;
package org.eclipse.hawkbit.rest;
import javax.servlet.http.HttpServletResponse;
@@ -15,6 +15,7 @@ import org.eclipse.hawkbit.rest.util.HttpResponseFactoryBean;
import org.eclipse.hawkbit.rest.util.RequestResponseContextHolder;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.hateoas.config.EnableHypermediaSupport;
@@ -25,6 +26,7 @@ import org.springframework.web.context.WebApplicationContext;
* Configuration for Rest api.
*/
@Configuration
@ComponentScan
@EnableHypermediaSupport(type = { HypermediaType.HAL })
public class RestConfiguration {

View File

@@ -70,6 +70,8 @@ public class ResponseExceptionHandler {
ERROR_TO_HTTP_STATUS.put(SpServerError.SP_CONFIGURATION_KEY_INVALID, HttpStatus.BAD_REQUEST);
ERROR_TO_HTTP_STATUS.put(SpServerError.SP_REPO_INVALID_TARGET_ADDRESS, HttpStatus.BAD_REQUEST);
ERROR_TO_HTTP_STATUS.put(SpServerError.SP_REPO_CONSTRAINT_VIOLATION, HttpStatus.BAD_REQUEST);
ERROR_TO_HTTP_STATUS.put(SpServerError.SP_REPO_OPERATION_NOT_SUPPORTED, HttpStatus.GONE);
}
private static HttpStatus getStatusOrDefault(final SpServerError error) {

View File

@@ -8,8 +8,8 @@
*/
package org.eclipse.hawkbit.rest;
import org.eclipse.hawkbit.repository.jpa.RepositoryApplicationConfiguration;
import org.eclipse.hawkbit.repository.test.util.AbstractIntegrationTest;
import org.eclipse.hawkbit.rest.configuration.RestConfiguration;
import org.eclipse.hawkbit.rest.util.FilterHttpResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
@@ -18,8 +18,7 @@ import org.springframework.test.web.servlet.setup.DefaultMockMvcBuilder;
/**
* Abstract Test for Rest tests.
*/
@SpringApplicationConfiguration(classes = { RestConfiguration.class,
org.eclipse.hawkbit.RepositoryApplicationConfiguration.class })
@SpringApplicationConfiguration(classes = { RestConfiguration.class, RepositoryApplicationConfiguration.class })
public abstract class AbstractRestIntegrationTest extends AbstractIntegrationTest {
@Autowired