Skip to content

Commit

Permalink
Change to "Spring Boot dependency management". Add log4j2.xml configu…
Browse files Browse the repository at this point in the history
…ration.
  • Loading branch information
patrikbjork committed Jun 15, 2022
1 parent b018105 commit 4f696f8
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 84 deletions.
6 changes: 0 additions & 6 deletions core-bc/composites/db-migration-svc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,17 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.8</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.3</version>
</dependency>



</dependencies>

<build>
Expand Down
27 changes: 6 additions & 21 deletions core-bc/composites/svc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<version>1.6.2</version>
<!-- <version>1.6.2</version>-->
</dependency>

<dependency>
Expand All @@ -40,92 +40,81 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.fw.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.fw.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.fw.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.fw.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.fw.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>5.5.2</version>
</dependency>

<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>5.5.2</version>
</dependency>

<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>2.5.5</version>
</dependency>

<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.8</version>
</dependency>

<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.1.0</version>
<version>3.10.2</version>
</dependency>

<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.9</version>
<version>5.2.2</version>
</dependency>

<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.9</version>
<version>5.2.2</version>
</dependency>

<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>2.10.2</version>
</dependency>

<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.5.2</version>
<version>0.9.5.5</version>
</dependency>

<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>2.2.1</version>
<exclusions>
<exclusion>
<groupId>c3p0</groupId>
Expand All @@ -143,31 +132,27 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.190</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>eu.agno3.jcifs</groupId>
<artifactId>jcifs-ng</artifactId>
<version>2.0.5</version>
<version>2.1.7</version>
</dependency>

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
<!--
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,13 @@ public static String createToken(String userId, String displayName, String[] rol
.withIssuedAt(now)
.withExpiresAt(timeAhead)
.sign(Algorithm.HMAC256(secret));
} catch (Exception e){
} catch (Exception e) {
throw new RuntimeException(e);
}
}

public static DecodedJWT verify(String jwtToken) throws JWTVerificationException {
try {
JWTVerifier verifier = JWT.require(Algorithm.HMAC256(secret)).build();
return verifier.verify(jwtToken);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
JWTVerifier verifier = JWT.require(Algorithm.HMAC256(secret)).build();
return verifier.verify(jwtToken);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,10 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import se.vgregion.arbetsplatskoder.domain.jpa.migrated.Data;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.regex.Pattern;

import static org.junit.Assert.*;
import static org.junit.Assert.assertNotNull;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationContext-test.xml")
Expand All @@ -37,4 +26,4 @@ public void generate() throws Exception {



}
}
2 changes: 1 addition & 1 deletion core-bc/modules/client/proxy.conf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"/api": {
"target": "http://localhost:8080/",
"target": "http://host.docker.internal:8080/",
"secure": false,
"pathRewrite": {
"^/api": "/arbetsplatskoder"
Expand Down
5 changes: 1 addition & 4 deletions core-bc/modules/intsvc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,16 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
Expand All @@ -59,7 +56,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.190</version>
<!-- <version>1.4.190</version>-->
</dependency>

<dependency>
Expand Down
20 changes: 0 additions & 20 deletions core-bc/modules/intsvc/src/main/resources/log4j.properties

This file was deleted.

13 changes: 13 additions & 0 deletions core-bc/modules/intsvc/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
4 changes: 1 addition & 3 deletions core-bc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,19 @@ Generation time : 2015-01-14 09:02:50 CET
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.28.2</version>
<!-- <version>2.28.2</version>-->
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.fw.version}</version>
<scope>test</scope>
</dependency>

Expand Down
34 changes: 25 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>se.vgregion.common</groupId>
<artifactId>profile-open</artifactId>
<version>2.15</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.7.0</version>
</parent>

<groupId>se.vgregion.arbetsplatskoder</groupId>
Expand All @@ -23,6 +23,16 @@
<module>core-bc</module>
</modules>

<!--<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.7.0</version>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>-->
<!--NB! SCM config below assumes system name equals VGR subversion/googlecode project name! -->
<!-- Open Source repo -->
<!--<scm>
Expand All @@ -45,18 +55,24 @@
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
</dependencies>

<properties>
<compileSource>11</compileSource>
<compileTarget>11</compileTarget>
<!-- <maven.compiler.source>11</maven.compiler.source>-->
<!-- <maven.compiler.target>11</maven.compiler.target>-->
<apache.cxf.version>3.1.8</apache.cxf.version>
<junit.version>4.8.1</junit.version>
<log4j.version>1.2.16</log4j.version>
<!-- <apache.cxf.version>3.1.8</apache.cxf.version>-->
<!-- <log4j.version>1.2.16</log4j.version>-->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<slf4j.version>1.6.1</slf4j.version>
<spring.fw.version>5.3.10</spring.fw.version>
<spring.version>${spring.fw.version}</spring.version>
<!-- <slf4j.version>1.6.1</slf4j.version>-->
<!-- <spring.fw.version>5.3.10</spring.fw.version>-->
<!-- <spring.version>${spring.fw.version}</spring.version>-->
<!-- <spring.fw.version>4.3.6.RELEASE</spring.fw.version>-->
</properties>
</project>

0 comments on commit 4f696f8

Please sign in to comment.