Notes: 1. (!) Eclipselink shall be migrated to 5.0 (in 4.0.8 there are incompatible classes, e.g EJBQueryImpl doesn't implement some newer methods). In the moment is with beta (5.0.0-B12) - JUST for testing! 2. (!) Ethlo plugin doesn't work with Eclipselink 5.0, it builds with Eclipselink 4.0.8 (could be a problem) 3. Dependencies - new starters, test starters changes, some dependencies refactoring 4. Auto-configs split - package changes, some properties classes changes 5. Spring nullable org.springframework.lang.Nullable/NonNull are depecated and replaced with jspcify -> org.jspecify.annotations.Nullable/NonNull (NullMarked) 6. Lombok config - adding lombok.addNullAnnotations=jspecify - to do not mess annotations 7. Distributed lock table changes - SP_LOCK table db migration 8. Spring Retry replaced with Spring Core Retry - does repace retry in hawkbit 9. Specifications -> added Update/Delete(/Predicate) Specifications and JpaSpecificationExecutor changed 10. HawkbitBaseRepositoryFactoryBean modified to register properly 11. Jackson - 2 -> 3, package migrations, finals are not deserialized by default(enable finals deserialization, consider make non-final), too ‘smart’ tries to set complex objects instead of using non args constructor (-> @JsonIgnore), some other default configs made Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -283,8 +283,8 @@ public class RestConfiguration {
|
||||
}
|
||||
|
||||
@ExceptionHandler({ DataIntegrityViolationException.class })
|
||||
public ResponseEntity<ExceptionInfo> handleDataAccessException(final HttpServletRequest request,
|
||||
final DataIntegrityViolationException ex) {
|
||||
public ResponseEntity<ExceptionInfo> handleDataAccessException(
|
||||
final HttpServletRequest request, final DataIntegrityViolationException ex) {
|
||||
if (log.isDebugEnabled()) {
|
||||
logRequest(request, ex);
|
||||
} else {
|
||||
@@ -302,10 +302,8 @@ public class RestConfiguration {
|
||||
return ERROR_TO_HTTP_STATUS.getOrDefault(error, DEFAULT_RESPONSE_STATUS);
|
||||
}
|
||||
|
||||
// enable certain level of debug with
|
||||
// -> logging.level.org.eclipse.hawkbit.rest.RestConfiguration=DEBUG
|
||||
// or for more detailed log
|
||||
// -> logging.level.org.eclipse.hawkbit.rest.RestConfiguration=TRACE
|
||||
// enable certain level of debug with -> logging.level.org.eclipse.hawkbit.rest.RestConfiguration=DEBUG
|
||||
// or for more detailed log -> logging.level.org.eclipse.hawkbit.rest.RestConfiguration=TRACE
|
||||
private void logRequest(final HttpServletRequest request, final Exception ex) {
|
||||
if (log.isTraceEnabled()) {
|
||||
log.trace(LOG_EXCEPTION_FORMAT, ex.getClass().getName(), request.getRequestURL(), ex);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# Copyright (c) 2015 Bosch Software Innovations GmbH and others
|
||||
#
|
||||
# This program and the accompanying materials are made
|
||||
# available under the terms of the Eclipse Public License 2.0
|
||||
# which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
|
||||
# DDI and download security
|
||||
hawkbit.server.ddi.security.authentication.header.enabled=false
|
||||
hawkbit.server.ddi.security.authentication.header.authority=
|
||||
hawkbit.server.ddi.security.authentication.targettoken.enabled=false
|
||||
hawkbit.server.ddi.security.authentication.gatewaytoken.enabled=false
|
||||
hawkbit.server.ddi.security.authentication.gatewaytoken.key=
|
||||
hawkbit.server.download.anonymous.enabled=false
|
||||
@@ -19,8 +19,8 @@ import org.eclipse.hawkbit.repository.test.TestConfiguration;
|
||||
import org.eclipse.hawkbit.repository.test.util.AbstractIntegrationTest;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
|
||||
import org.springframework.data.jpa.domain.Specification;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
@@ -72,4 +72,4 @@ public abstract class AbstractRestIntegrationTest extends AbstractIntegrationTes
|
||||
protected static Specification<JpaAction> byDistributionSetId(final Long distributionSetId) {
|
||||
return (root, query, cb) -> cb.equal(root.get(JpaAction_.distributionSet).get(AbstractJpaBaseEntity_.id), distributionSetId);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user