Upgrade to Spring Boot 1.4 (#415)

* Boot upgrade due to known security issues.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2017-01-17 15:03:52 +01:00
committed by GitHub
parent ac85996eb6
commit 1beb2875fa
9 changed files with 37 additions and 15 deletions

View File

@@ -11,11 +11,13 @@
# data example to a cloud foundry enviroment. Expects existing CF CLI
# installation and login to be existing already.
cf api https://api.eu-gb.bluemix.net
cf login
cf stop hawkbit-simulator
cd examples/hawkbit-example-app/target/
cf push
cd ../..
java -jar hawkbit-example-mgmt-simulator/target/hawkbit-example-mgmt-simulator-0.2.0-SNAPSHOT.jar --hawkbit.url=https://hawkbit.eu-gb.mybluemix.net
java -jar hawkbit-example-mgmt-simulator/target/hawkbit-example-mgmt-simulator-0.2.0-SNAPSHOT-exec.jar --hawkbit.url=https://hawkbit.eu-gb.mybluemix.net
cd hawkbit-device-simulator/target/
cf push
cd ../../..

View File

@@ -14,6 +14,10 @@ server.tomcat.internal-proxies=.*
vaadin.servlet.productionMode=true
# Sandbox, small files only
spring.http.multipart.max-file-size=100KB
spring.http.multipart.max-request-size=-1
## Configuration for building download URLs - START
hawkbit.artifact.url.protocols.download-http.rel=download-http
hawkbit.artifact.url.protocols.download-http.protocol=https

View File

@@ -35,6 +35,10 @@ hawkbit.server.ui.demo.password=admin
hawkbit.server.ui.demo.user=admin
hawkbit.server.ui.demo.tenant=DEFAULT
# Upload of large files
spring.http.multipart.max-file-size=1024MB
spring.http.multipart.max-request-size=-1
# UI help links
hawkbit.server.ui.links.documentation.root=https://github.com/eclipse/hawkbit
hawkbit.server.ui.links.documentation.deployment-view=https://github.com/eclipse/hawkbit

View File

@@ -10,13 +10,13 @@ Run getting started example
$ java -jar hawkbit-example-mgmt-simulator-#version#.jar
$ java -jar hawkbit-example-mgmt-simulator-#version#-exec.jar
Run create and start rollout example
$ java -jar hawkbit-example-mgmt-simulator-#version#.jar --createrollout
$ java -jar hawkbit-example-mgmt-simulator-#version#-exec.jar --createrollout
## This example shows

View File

@@ -32,6 +32,7 @@
</goals>
<configuration>
<outputDirectory>${baseDir}</outputDirectory>
<classifier>exec</classifier>
<addResources>false</addResources>
<mainClass>org.eclipse.hawkbit.mgmt.client.Application</mainClass>
<layout>JAR</layout>

View File

@@ -17,7 +17,7 @@ spring.data.mongodb.port=28017
hawkbit.server.ddi.security.authentication.header.enabled=true
hawkbit.server.ddi.security.authentication.gatewaytoken.name=TestToken
multipart.max-file-size=5MB
spring.http.multipart.max-file-size=5MB
hawkbit.server.security.dos.maxStatusEntriesPerAction=100

View File

@@ -11,6 +11,7 @@ package org.eclipse.hawkbit.repository.jpa;
import java.util.Map;
import javax.persistence.EntityManager;
import javax.sql.DataSource;
import org.eclipse.hawkbit.ControllerPollProperties;
import org.eclipse.hawkbit.repository.ArtifactManagement;
@@ -66,9 +67,12 @@ import org.eclipse.hawkbit.security.SecurityTokenGenerator;
import org.eclipse.hawkbit.security.SystemSecurityContext;
import org.eclipse.hawkbit.tenancy.TenantAware;
import org.eclipse.hawkbit.tenancy.configuration.TenantConfigurationProperties;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.orm.jpa.EntityScan;
import org.springframework.context.annotation.Bean;
@@ -82,6 +86,7 @@ import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.transaction.jta.JtaTransactionManager;
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;
import com.google.common.collect.Maps;
@@ -102,6 +107,12 @@ import com.google.common.collect.Maps;
@EntityScan("org.eclipse.hawkbit.repository.jpa.model")
public class RepositoryApplicationConfiguration extends JpaBaseConfiguration {
@Autowired
RepositoryApplicationConfiguration(final DataSource dataSource, final JpaProperties jpaProperties,
final ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider) {
super(dataSource, jpaProperties, jtaTransactionManagerProvider);
}
@Bean
@ConditionalOnMissingBean
public RsqlValidationOracle rsqlValidationOracle() {

View File

@@ -13,7 +13,7 @@ logging.level.org.eclipse.persistence=ERROR
spring.data.mongodb.uri=mongodb://localhost/spArtifactRepository${random.value}
spring.data.mongodb.port=28017
multipart.max-file-size=5MB
spring.http.multipart.max-file-size=5MB
hawkbit.server.security.dos.maxStatusEntriesPerAction=100

20
pom.xml
View File

@@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.8.RELEASE</version>
<version>1.4.3.RELEASE</version>
</parent>
<groupId>org.eclipse.hawkbit</groupId>
@@ -101,18 +101,14 @@
<properties>
<java.version>1.8</java.version>
<spring.boot.version>1.3.8.RELEASE</spring.boot.version>
<spring.boot.version>1.4.3.RELEASE</spring.boot.version>
<snapshotDependencyAllowed>true</snapshotDependencyAllowed>
<!-- Spring boot version overrides (should be reviewed with every boot upgrade) - START -->
<!-- Newer versions needed than defined in Boot -->
<spring-amqp.version>1.6.5.RELEASE</spring-amqp.version>
<spring-security.version>4.1.2.RELEASE</spring-security.version>
<spring.version>4.3.3.RELEASE</spring.version>
<spring-integration.version>4.3.2.RELEASE</spring-integration.version>
<spring-data-releasetrain.version>Hopper-SR5</spring-data-releasetrain.version>
<!-- Support for MongoDB 3 -->
<mongodb.version>3.2.2</mongodb.version>
<!-- Newer versions needed than defined in Boot -->
<!-- Older versions needed than defined in Boot -->
<!-- Incompatible changes in 2.2 -->
<json-path.version>2.0.0</json-path.version>
<!-- Spring boot version overrides - END -->
<!-- Vaadin versions - START -->
@@ -595,6 +591,10 @@
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>