Spring Boot 2.0 (#721)
* Migration to Boot 2.0. Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
package org.eclipse.hawkbit.repository.model.helper;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.cloud.bus.BusProperties;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
|
||||
/**
|
||||
@@ -26,7 +26,7 @@ public final class EventPublisherHolder {
|
||||
private ApplicationEventPublisher eventPublisher;
|
||||
|
||||
@Autowired
|
||||
private ApplicationContext applicationContext;
|
||||
private BusProperties bus;
|
||||
|
||||
private EventPublisherHolder() {
|
||||
|
||||
@@ -47,7 +47,7 @@ public final class EventPublisherHolder {
|
||||
}
|
||||
|
||||
public String getApplicationId() {
|
||||
return applicationContext.getId();
|
||||
return bus.getId();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,10 +42,12 @@ import org.eclipse.hawkbit.repository.TimestampCalculator;
|
||||
*/
|
||||
public class VirtualPropertyResolver extends StrLookup<String> implements VirtualPropertyReplacer {
|
||||
|
||||
private StrSubstitutor substitutor;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private transient StrSubstitutor substitutor;
|
||||
|
||||
@Override
|
||||
public String lookup(String rhs) {
|
||||
public String lookup(final String rhs) {
|
||||
String resolved = null;
|
||||
|
||||
if ("now_ts".equalsIgnoreCase(rhs)) {
|
||||
@@ -57,7 +59,7 @@ public class VirtualPropertyResolver extends StrLookup<String> implements Virtua
|
||||
}
|
||||
|
||||
@Override
|
||||
public String replace(String input) {
|
||||
public String replace(final String input) {
|
||||
if (substitutor == null) {
|
||||
substitutor = new StrSubstitutor(this, StrSubstitutor.DEFAULT_PREFIX, StrSubstitutor.DEFAULT_SUFFIX,
|
||||
StrSubstitutor.DEFAULT_ESCAPE);
|
||||
|
||||
Reference in New Issue
Block a user