Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update spring version #19

Merged
merged 2 commits into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,6 @@ The Semantic Hub is a logical and architectural component of Tractus-X.
The source code under this folder contains reference implementations of the SLDT Semantic Hub

## Build Packages
The project requires a private package from https://maven.pkg.github.com/eclipse-dataspaceconnector/DataSpaceConnector.
Add the following configuration to your `.m2/settings.xml`:

```xml
<server>
<id>edc-github</id>
<username>oauth2</username>
<password>$ADD_GITHUB_ACCESS_TOKEN_HERE</password>
</server>
```

You need to add your own GitHub Access Token. Navigate to https://github.com/settings/tokens and create a new token
with the permission `read:packages`.

Run `mvn install` to run unit tests, build and install the package.

Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# SPDX-License-Identifier: Apache-2.0
###############################################################

FROM eclipse-temurin:11-jre
FROM eclipse-temurin:11.0.16.1_1-jre-jammy

RUN apt-get -y upgrade \
&& apt-get -y update \
Expand Down
15 changes: 11 additions & 4 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand Down Expand Up @@ -108,6 +104,17 @@
<groupId>io.openmanufacturing</groupId>
<artifactId>sds-aspect-model-starter</artifactId>
</dependency>
<!--
The AASX generator uses this dependency to generate AASX XML files.
The jackson version provided by Spring Boot has an issue, xml prefixes are not generated correctly.
To mitigate this problem we downgraded to the latest working version.
If there is a newer version you can try out if it works by running the test ModelsApi#testAasxEndpointExpectSuccess.
-->
<dependency>
<artifactId>jackson-dataformat-xml</artifactId>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<version>2.12.7</version>
</dependency>
<dependency>
<groupId>io.openmanufacturing</groupId>
<artifactId>sds-aspect-model-aas-generator</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public class OAuthSecurityConfig extends WebSecurityConfigurerAdapter {
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests(auth -> auth
.antMatchers(HttpMethod.OPTIONS).permitAll()
.mvcMatchers(HttpMethod.GET,"/**/models/**").access("@authorizationEvaluator.hasRoleViewSemanticModel()")
.mvcMatchers(HttpMethod.POST,"/**/models/**").access("@authorizationEvaluator.hasRoleAddSemanticModel()")
.mvcMatchers(HttpMethod.PUT,"/**/models/**").access("@authorizationEvaluator.hasRoleUpdateSemanticModel()")
.mvcMatchers(HttpMethod.DELETE,"/**/models/**").access("@authorizationEvaluator.hasRoleDeleteSemanticModel()"))
.mvcMatchers(HttpMethod.OPTIONS).permitAll()
.antMatchers(HttpMethod.GET,"/**/models/**").access("@authorizationEvaluator.hasRoleViewSemanticModel()")
.antMatchers(HttpMethod.POST,"/**/models/**").access("@authorizationEvaluator.hasRoleAddSemanticModel()")
.antMatchers(HttpMethod.PUT,"/**/models/**").access("@authorizationEvaluator.hasRoleUpdateSemanticModel()")
.antMatchers(HttpMethod.DELETE,"/**/models/**").access("@authorizationEvaluator.hasRoleDeleteSemanticModel()"))
.csrf().disable()
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
.oauth2ResourceServer().jwt();
Expand Down
3 changes: 3 additions & 0 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ http:
spring:
application:
name: semantics-services
mvc:
pathmatch:
matching-strategy: ant-path-matcher
banner:
location: "classpath:banner.txt"
servlet:
Expand Down
60 changes: 2 additions & 58 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.14</version> <!-- need to be repeated in properties section for technical purposes -->
<version>2.7.3</version> <!-- need to be repeated in properties section for technical purposes -->
<relativePath/> <!-- lookup parent from repository and not the filesystem -->
</parent>

Expand Down Expand Up @@ -65,9 +65,7 @@

<!-- version properties -->
<!-- framework and base stuff -->
<spring.boot.version>2.5.14</spring.boot.version>
<spring.cloud.version>2020.0.3</spring.cloud.version>
<spring.version>5.3.20</spring.version>
<spring.boot.version>2.7.3</spring.boot.version>
<spring.feign.version>3.1.3</spring.feign.version>
<springdoc.version>1.6.6</springdoc.version>
<springfox.version>2.9.2</springfox.version>
Expand Down Expand Up @@ -165,13 +163,6 @@
<version>${google.findbugs.version}</version>
</dependency>
<!-- Framework -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring.cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
Expand Down Expand Up @@ -213,22 +204,6 @@
</dependency>

<!-- spring -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>${spring.feign.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-openfeign-core</artifactId>
<version>${spring.feign.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
Expand All @@ -240,12 +215,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>

<!-- Open API Stuff -->
<dependency>
<groupId>org.springdoc</groupId>
Expand Down Expand Up @@ -280,31 +249,6 @@
<artifactId>jackson-databind-nullable</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-core</artifactId>
<version>${feign-version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-jackson</artifactId>
<version>${feign-version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-slf4j</artifactId>
<version>${feign-version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign.form</groupId>
<artifactId>feign-form</artifactId>
<version>${feign-form-version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpcomponents.version}</version>
</dependency>

<!-- Formats -->
<dependency>
Expand Down