Skip to content

Commit

Permalink
Merge pull request #309 from DP-3T/develop
Browse files Browse the repository at this point in the history
PR Release 2.2.1
  • Loading branch information
martinalig committed Sep 10, 2021
2 parents 24837ff + 8103468 commit 934bb26
Show file tree
Hide file tree
Showing 17 changed files with 186 additions and 102 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ This project is licensed under the terms of the MPL 2 license. See the [LICENSE]
## Repositories
* Android SDK & Calibration app: [dp3t-sdk-android](https://github.com/DP-3T/dp3t-sdk-android)
* iOS SDK & Calibration app: [dp3t-sdk-ios](https://github.com/DP-3T/dp3t-sdk-ios)
* Android Demo App: [dp3t-app-android](https://github.com/DP-3T/dp3t-app-android)
* iOS Demo App: [dp3t-app-ios](https://github.com/DP-3T/dp3t-app-ios)
* Backend SDK: [dp3t-sdk-backend](https://github.com/DP-3T/dp3t-sdk-backend)

For an example project using the SDK look at the Swiss contact tracing app [SwissCovid](https://github.com/SwissCovid).

## DP3T
The Decentralised Privacy-Preserving Proximity Tracing (DP3T) project is an open protocol for COVID-19 proximity tracing using Bluetooth Low Energy functionality on mobile devices, which ensures that personal data and computation stay entirely on an individual's phone. It was produced by a core team of over 25 scientists and academic researchers from across Europe. It has also been scrutinized and improved by the wider community.

Expand Down
2 changes: 1 addition & 1 deletion dpppt-backend-sdk/dpppt-backend-sdk-data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<parent>
<groupId>org.dpppt</groupId>
<artifactId>dpppt-backend-sdk</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>2.2.1-SNAPSHOT</version>
</parent>
<artifactId>dpppt-backend-sdk-data</artifactId>
<name>DP3T Backend SDK Data</name>
Expand Down
8 changes: 7 additions & 1 deletion dpppt-backend-sdk/dpppt-backend-sdk-interops/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>org.dpppt</groupId>
<artifactId>dpppt-backend-sdk</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>2.2.1-SNAPSHOT</version>
</parent>
<artifactId>dpppt-backend-sdk-interops</artifactId>
<name>DP3T Backend SDK Interops Service</name>
Expand Down Expand Up @@ -71,6 +71,12 @@
<artifactId>spring-security-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cloud-connectors</artifactId>
<version>${spring-cloud-connectors-version}</version>
</dependency>

<!-- Springboot configuration processor -->
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@

@Configuration
@ConfigurationPropertiesScan("org.dpppt.backend.sdk.interops.model")
@ComponentScan(basePackages = {"org.dpppt.backend.sdk.interops.config"})
@ComponentScan(
basePackages = {
"org.dpppt.backend.sdk.interops.config",
"ch.admin.bag.covidcertificate.log",
"ch.admin.bag.covidcertificate.rest"
})
@EnableAutoConfiguration(
exclude = {SecurityAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class})
@EnableWebMvc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,40 @@

package org.dpppt.backend.sdk.interops.config;

import java.util.Map;
import javax.sql.DataSource;
import org.flywaydb.core.Flyway;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.CloudFactory;
import org.springframework.cloud.service.PooledServiceConnectorConfig.PoolConfig;
import org.springframework.cloud.service.relational.DataSourceConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;

@Configuration
public abstract class WSCloudBaseConfig extends WSBaseConfig {

@Autowired @Lazy private DataSource dataSource;
@Value("${datasource.maximumPoolSize:5}")
int dataSourceMaximumPoolSize;

@Value("${datasource.connectionTimeout:30000}")
int dataSourceConnectionTimeout;

@Value("${datasource.leakDetectionThreshold:0}")
int dataSourceLeakDetectionThreshold;

@Bean
@Override
public DataSource dataSource() {
return dataSource;
PoolConfig poolConfig = new PoolConfig(dataSourceMaximumPoolSize, dataSourceConnectionTimeout);
DataSourceConfig dbConfig =
new DataSourceConfig(
poolConfig,
null,
null,
Map.of("leakDetectionThreshold", dataSourceLeakDetectionThreshold));
CloudFactory factory = new CloudFactory();
return factory.getCloud().getSingletonServiceConnector(DataSource.class, dbConfig);
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#
# SPDX-License-Identifier: MPL-2.0
#
spring.profiles.active=prod
spring.profiles.active=prod,local
spring.application.name=dp3t-insterops-sync-service
management.endpoints.enabled-by-default=false
server.error.whitelabel.enabled=true
#-------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
~ Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch>
~
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
~
~ SPDX-License-Identifier: MPL-2.0
-->

<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>

<property resource="application.properties"/>
<springProperty scope="context" name="springAppName" source="spring.application.name"/>
<property name="LOG_FILE" value="${springAppName}"/>

<!-- You can override this to have a custom pattern -->
<!-- Make sure not to remove LOG_LEVEL_PATTERN, as it's needed by Sleuth -->
<property name="CONSOLE_LOG_PATTERN"
value="%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>


<!-- Appender to log to console -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<!-- Minimum logging level to be presented in the console logs-->
<level>DEBUG</level>
</filter>
<encoder>
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
<charset>utf8</charset>
</encoder>
</appender>

<!-- Appender to log to file -->
<appender name="flatfile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_FILE}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.gz</fileNamePattern>
<maxHistory>7</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
<charset>utf8</charset>
</encoder>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>512KB</MaxFileSize>
</triggeringPolicy>
</appender>
<logger name="org.dpppt" level="DEBUG"/>
<root level="INFO">
<appender-ref ref="console"/>
<appender-ref ref="flatfile"/>
</root>

</configuration>

This file was deleted.

2 changes: 1 addition & 1 deletion dpppt-backend-sdk/dpppt-backend-sdk-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<parent>
<groupId>org.dpppt</groupId>
<artifactId>dpppt-backend-sdk</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>2.2.1-SNAPSHOT</version>
</parent>
<artifactId>dpppt-backend-sdk-model</artifactId>
<name>DP3T Backend SDK Model</name>
Expand Down
4 changes: 2 additions & 2 deletions dpppt-backend-sdk/dpppt-backend-sdk-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<parent>
<groupId>org.dpppt</groupId>
<artifactId>dpppt-backend-sdk</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>2.2.1-SNAPSHOT</version>
</parent>
<artifactId>dpppt-backend-sdk-report</artifactId>
<name>DP3T Backend SDK Report</name>
Expand All @@ -42,7 +42,7 @@
<dependency>
<groupId>org.dpppt</groupId>
<artifactId>dpppt-backend-sdk-ws</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>2.2.1-SNAPSHOT</version>
</dependency>

</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions dpppt-backend-sdk/dpppt-backend-sdk-ws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>org.dpppt</groupId>
<artifactId>dpppt-backend-sdk</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>2.2.1-SNAPSHOT</version>
</parent>
<artifactId>dpppt-backend-sdk-ws</artifactId>
<name>DP3T Backend SDK WS</name>
Expand All @@ -35,7 +35,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cloud-connectors</artifactId>
<version>2.0.7.RELEASE</version>
<version>${spring-cloud-connectors-version}</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

@Configuration
@ComponentScan(basePackages = {"org.dpppt.backend.sdk.ws.config"})
@ComponentScan(
basePackages = {
"org.dpppt.backend.sdk.ws.config",
"ch.admin.bag.covidcertificate.log",
"ch.admin.bag.covidcertificate.rest"
})
@EnableAutoConfiguration(
exclude = {SecurityAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class})
@EnableWebMvc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
# SPDX-License-Identifier: MPL-2.0
#

spring.profiles.active=prod
spring.profiles.active=prod,local
spring.application.name=dp3t-backend-service
management.endpoints.enabled-by-default=false
server.error.whitelabel.enabled=true
#-------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
~ Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch>
~
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
~
~ SPDX-License-Identifier: MPL-2.0
-->

<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>

<property resource="application.properties"/>
<springProperty scope="context" name="springAppName" source="spring.application.name"/>
<property name="LOG_FILE" value="${springAppName}"/>

<!-- You can override this to have a custom pattern -->
<!-- Make sure not to remove LOG_LEVEL_PATTERN, as it's needed by Sleuth -->
<property name="CONSOLE_LOG_PATTERN"
value="%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>


<!-- Appender to log to console -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<!-- Minimum logging level to be presented in the console logs-->
<level>DEBUG</level>
</filter>
<encoder>
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
<charset>utf8</charset>
</encoder>
</appender>

<!-- Appender to log to file -->
<appender name="flatfile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_FILE}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.gz</fileNamePattern>
<maxHistory>7</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
<charset>utf8</charset>
</encoder>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>512KB</MaxFileSize>
</triggeringPolicy>
</appender>
<logger name="org.dpppt" level="DEBUG"/>
<root level="INFO">
<appender-ref ref="console"/>
<appender-ref ref="flatfile"/>
</root>

</configuration>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

@ComponentScan(basePackages = {"org.dpppt.backend.sdk.ws.config"})
@ComponentScan(
basePackages = {
"org.dpppt.backend.sdk.ws.config",
"ch.admin.bag.covidcertificate.log",
"ch.admin.bag.covidcertificate.rest"
})
@SpringBootApplication
public class TestApplication {}
Loading

0 comments on commit 934bb26

Please sign in to comment.