Skip to content

Commit

Permalink
Merge branch 'holacms31_jakarata' into holacms31
Browse files Browse the repository at this point in the history
  • Loading branch information
commel committed Aug 31, 2023
2 parents fa3a322 + ba24c4c commit 2a6597b
Show file tree
Hide file tree
Showing 33 changed files with 235 additions and 193 deletions.
2 changes: 1 addition & 1 deletion nb-configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ Any value defined here will override the pom.xml file value but is only applicab
<org-netbeans-modules-css-prep.sass_2e_compiler_2e_options/>
<org-netbeans-modules-css-prep.less_2e_compiler_2e_options/>
<org-netbeans-modules-css-prep.sass_2e_mappings>/scss:/css</org-netbeans-modules-css-prep.sass_2e_mappings>
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>1.8-web</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>10-web</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>
</properties>
</project-shared-configuration>
83 changes: 42 additions & 41 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,30 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>5.3.23</spring.version>
<spring.security.version>5.7.5</spring.security.version>
<spring.version>6.0.11</spring.version>
<spring.security.version>6.1.3</spring.security.version>
<slf4jVersion>1.6.1</slf4jVersion>
<jackson.version>2.14.0</jackson.version>

<maven.compiler.release>17</maven.compiler.release>
</properties>

<dependencies>
<!-- Java -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>8.0.1</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.1</version>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>

<!-- https://mvnrepository.com/artifact/jakarta.persistence/jakarta.persistence-api -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
<scope>compile</scope>
</dependency>

<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>3.1.0</version>
</dependency>

<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
Expand Down Expand Up @@ -87,6 +72,12 @@
</dependency>

<!-- Spring Security -->
<!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-core -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
Expand Down Expand Up @@ -126,26 +117,28 @@
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>3.1.0.M3</version>
<version>3.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring5</artifactId>
<version>3.1.0.M3</version>
<artifactId>thymeleaf-spring6</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
<version>3.1.0.M1</version>
<artifactId>thymeleaf-extras-springsecurity6</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<artifactId>hamcrest</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>


<!-- JPA-Implementation -->
<dependency>
<groupId>org.springframework</groupId>
Expand All @@ -156,20 +149,28 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.6.14.Final</version>
<version>6.2.7.Final</version>
</dependency>

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

<!-- https://mvnrepository.com/artifact/io.hypersistence/hypersistence-utils-hibernate-62 -->
<dependency>
<groupId>com.vladmihalcea</groupId>
<artifactId>hibernate-types-55</artifactId>
<version>2.20.0</version>
<groupId>io.hypersistence</groupId>
<artifactId>hypersistence-utils-hibernate-62</artifactId>
<version>3.5.1</version>
</dependency>

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


<!-- <dependency>
<groupId>com.querydsl</groupId>
Expand Down Expand Up @@ -253,7 +254,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.0.23.Final</version>
<version>8.0.1.Final</version>
</dependency>

</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/holarse/admin/api/Drückblick.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import de.holarse.backend.types.NodeType;
import de.holarse.web.services.EntityLockService;
import java.util.List;
import javax.persistence.EntityNotFoundException;
import jakarta.persistence.EntityNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/de/holarse/api/drückblick/Drückblick.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import de.holarse.backend.db.repositories.JobRepository;
import de.holarse.web.services.JobService;
import de.holarse.workers.JobQueueContext;
import javax.persistence.EntityNotFoundException;
import javax.transaction.Transactional;
import javax.validation.Valid;
import jakarta.persistence.EntityNotFoundException;
import jakarta.transaction.Transactional;
import jakarta.validation.Valid;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -17,10 +17,8 @@
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.annotation.Secured;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Secured({"ROLE_API_DRÜCKBLICK", "ROLE_API_ADMIN"})
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/holarse/api/importer/ImportUsers.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.io.ByteArrayOutputStream;
import java.io.ObjectOutputStream;
import java.time.OffsetDateTime;
import javax.transaction.Transactional;
import jakarta.transaction.Transactional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import de.holarse.backend.db.User;
import de.holarse.backend.db.repositories.UserRepository;
import javax.transaction.Transactional;
import jakarta.transaction.Transactional;

import org.hibernate.Hibernate;
import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
import org.springframework.stereotype.Component;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.time.OffsetDateTime;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import de.holarse.backend.types.DrückblickSourceType;
import java.io.Serializable;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotBlank;

public class DrückblickEntry implements Serializable {

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/de/holarse/backend/db/ApiUser.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package de.holarse.backend.db;

import java.time.OffsetDateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;

@Table
@Entity(name = "apiusers")
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/de/holarse/backend/db/Base.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package de.holarse.backend.db;

import java.io.Serializable;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.SequenceGenerator;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.MappedSuperclass;
import jakarta.persistence.SequenceGenerator;

@MappedSuperclass
public abstract class Base implements Serializable {
Expand Down
13 changes: 7 additions & 6 deletions src/main/java/de/holarse/backend/db/DrückblickEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import de.holarse.backend.types.DrückblickSourceType;
import de.holarse.backend.types.NodeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;
import io.hypersistence.utils.hibernate.type.basic.PostgreSQLEnumType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.Table;
import org.hibernate.annotations.Type;

@Table(name = "drückblick_entries")
Expand All @@ -29,7 +30,7 @@ public class DrückblickEntry extends TimestampedBase implements LockableEntity
private String category;

@Enumerated(EnumType.STRING)
@Type(type = "com.vladmihalcea.hibernate.type.basic.PostgreSQLEnumType")
@Column(columnDefinition = "source")
private DrückblickSourceType source;

private boolean done;
Expand Down
19 changes: 10 additions & 9 deletions src/main/java/de/holarse/backend/db/EntityWriteLock.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
package de.holarse.backend.db;

import de.holarse.backend.types.NodeType;
import io.hypersistence.utils.hibernate.type.basic.PostgreSQLEnumType;
import java.time.OffsetDateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.FetchType;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import org.hibernate.annotations.Type;

/**
Expand All @@ -39,7 +40,7 @@ public class EntityWriteLock extends Base {
private static final long serialVersionUID = 1L;

@Enumerated(EnumType.STRING)
@Type(type = "com.vladmihalcea.hibernate.type.basic.PostgreSQLEnumType")
// @Type(PostgreSQLEnumType.class)
@Column(name="entity")
private NodeType entity;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/de/holarse/backend/db/Job.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.holarse.backend.db;

import javax.persistence.Entity;
import javax.persistence.Table;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;

@Table(name = "jobs")
@Entity
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/de/holarse/backend/db/PageVisit.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

import java.io.Serializable;
import java.time.OffsetDateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;

/**
*
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/de/holarse/backend/db/Role.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package de.holarse.backend.db;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import org.springframework.security.core.GrantedAuthority;


Expand Down
4 changes: 2 additions & 2 deletions src/main/java/de/holarse/backend/db/TimestampedBase.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package de.holarse.backend.db;

import java.time.OffsetDateTime;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import jakarta.persistence.Column;
import jakarta.persistence.MappedSuperclass;

@MappedSuperclass
public abstract class TimestampedBase extends Base {
Expand Down
Loading

0 comments on commit 2a6597b

Please sign in to comment.