Skip to content
Draft
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
53 changes: 13 additions & 40 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,15 @@
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-boot.version>3.5.5</spring-boot.version>

<build-tools.version>1.0.0</build-tools.version>
<plugin.license-maven.version>5.0.0</plugin.license-maven.version>
<plugin.cxf.version>4.1.3</plugin.cxf.version>

<lombok.version>1.18.40</lombok.version>
<jetty.version>12.1.1</jetty.version>
<mysql.jdbc.version>9.4.0</mysql.jdbc.version>
<owasp-encoder.version>1.3.1</owasp-encoder.version>
<slf4j.version>2.0.17</slf4j.version>
<jooq.version>3.20.7</jooq.version>
<flyway.version>11.12.0</flyway.version>
<jaxb.version>4.0.10</jaxb.version>
Expand All @@ -50,6 +49,13 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>de.rwth.idsg</groupId>
<artifactId>steve-core</artifactId>
Expand Down Expand Up @@ -95,20 +101,6 @@
<artifactId>steve-ui-jsp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>6.2.11</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-bom</artifactId>
<version>6.5.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
Expand All @@ -123,20 +115,6 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-bom</artifactId>
<version>${jetty.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-bom</artifactId>
<version>${jetty.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
Expand All @@ -152,16 +130,6 @@
<artifactId>jakarta.mail-api</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.17</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.18</version>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations-jakarta</artifactId>
Expand Down Expand Up @@ -225,6 +193,11 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
package de.rwth.idsg.steve.config;

import de.rwth.idsg.steve.SteveConfiguration;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
Expand Down Expand Up @@ -74,7 +73,7 @@ public class ApiDocsConfiguration {
}

@Bean
public OpenAPI apiDocs(SteveConfiguration config) {
public OpenAPI apiDocs(SteveProperties steveProperties) {
var title = "SteVe REST API Documentation";

var securityName = "basicAuth";
Expand All @@ -91,7 +90,7 @@ public OpenAPI apiDocs(SteveConfiguration config) {
.license(new License()
.name("GPL-3.0")
.url("https://github.com/steve-community/steve/blob/master/LICENSE.txt"))
.version(config.getSteveVersion()))
.version(steveProperties.getVersion()))
// https://stackoverflow.com/a/68185254
.servers(List.of(new Server().url("/").description("Default Server URL")))
// define a security schema
Expand Down
19 changes: 4 additions & 15 deletions steve-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,17 @@
<artifactId>steve-core</artifactId>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>de.rwth.idsg</groupId>
<artifactId>steve-ocpp-1-x</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<exclusions>
<!-- http://docs.spring.io/spring/docs/current/spring-framework-reference/html/overview.html#overview-not-using-commons-logging -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-jcl</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
Expand All @@ -50,10 +43,6 @@
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations-jakarta</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
Expand Down
138 changes: 0 additions & 138 deletions steve-core/src/main/java/de/rwth/idsg/steve/SteveConfiguration.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* SteVe - SteckdosenVerwaltung - https://github.com/steve-community/steve
* Copyright (C) 2013-2025 SteVe Community Team
* All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.rwth.idsg.steve.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@ConfigurationProperties("steve")
public class SteveProperties {

private Auth auth = new Auth();
private WebApi webapi = new WebApi();
private Ocpp ocpp = new Ocpp();
private String version;
private String gitDescribe;

@Data
public static class Auth {
private String user;
private String password;
}

@Data
public static class WebApi {
private String key;
private String value;
}

@Data
public static class Ocpp {
private String wsSessionSelectStrategy;
private boolean autoRegisterUnknownStations;
private String chargeBoxIdValidationRegex;
private Soap soap = new Soap();
}

@Data
public static class Soap {
private String routerEndpointPath;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import de.rwth.idsg.steve.SteveConfiguration;
import de.rwth.idsg.steve.SteveException;
import de.rwth.idsg.steve.config.SteveProperties;
import de.rwth.idsg.steve.repository.WebUserRepository;
import de.rwth.idsg.steve.repository.dto.WebUser;
import de.rwth.idsg.steve.service.dto.WebUserOverview;
Expand Down Expand Up @@ -73,7 +73,7 @@ public class WebUsersService implements UserDetailsManager {
// Because Guava's cache does not accept a null value
private static final UserDetails DUMMY_USER = new User("#", "#", Collections.emptyList());

private final SteveConfiguration config;
private final SteveProperties steveProperties;
private final ObjectMapper mapper;
private final WebUserRepository webUserRepository;
private final SecurityContextHolderStrategy securityContextHolderStrategy = getContextHolderStrategy();
Expand All @@ -91,8 +91,8 @@ public void afterStart(ContextRefreshedEvent event) {
}

var user = WebUser.builder()
.login(config.getAuth().getUserName())
.password(config.getAuth().getEncodedPassword())
.login(steveProperties.getAuth().getUser())
.password(encoder.encode(steveProperties.getAuth().getPassword()))
.enabled(true)
.authorities(EnumSet.of(WebUserAuthority.ADMIN))
.build();
Expand Down
Loading
Loading