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

Fixes #13: Spring Framework Kata update to Spring 6.0.8 and Java 17. #14

Merged
merged 1 commit into from
Jul 27, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
# os: [macos-latest, ubuntu-latest, windows-latest]
os: [ubuntu-latest]
java-version: [11, 16, 17]
java-version: [17]

runs-on: ${{ matrix.os }}

Expand Down
4 changes: 2 additions & 2 deletions spring-framework/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ The project can be loaded into an IDE as a single structure.

=== Project pre-requisites

1. JDK 11
1. JDK 17
2. A modern IDE (IntelliJ IDEA or Eclipse or Netbeans)
3. Apache Maven v3.6.3 or above
3. Apache Maven v3.8.6 or above

=== Project tree

Expand Down
13 changes: 1 addition & 12 deletions spring-framework/ch01_spring-inversion-of-control/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,16 @@
<parent>
<groupId>bnymellon.training.spring.framework</groupId>
<artifactId>spring-framework</artifactId>
<version>1.0.0</version>
<version>2.0.0</version>
</parent>
<artifactId>ch01_spring-inversion-of-control</artifactId>
<version>1.0.0</version>

<!-- Instruction to hint that we are producing a jar file -->
<packaging>jar</packaging>

<name>Spring Framework - Inversion of Control</name>
<description>Understanding Spring Inversion of Control</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- The properties below ensure that the code is picked up and compiled as Java 11 -->
<java.version>11</java.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencyManagement>
<dependencies>

Expand Down
13 changes: 1 addition & 12 deletions spring-framework/ch02_spring-dependency-injection/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,16 @@
<parent>
<groupId>bnymellon.training.spring.framework</groupId>
<artifactId>spring-framework</artifactId>
<version>1.0.0</version>
<version>2.0.0</version>
</parent>
<artifactId>ch02_spring-dependency-injection</artifactId>
<version>1.0.0</version>

<!-- Instruction to hint that we are producing a jar file -->
<packaging>jar</packaging>

<name>Spring Framework - Dependency Injection</name>
<description>Understanding Spring Dependency Injection</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- The properties below ensure that the code is picked up and compiled as Java 11 -->
<java.version>11</java.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencyManagement>
<dependencies>

Expand Down
14 changes: 2 additions & 12 deletions spring-framework/ch03_spring-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,17 @@
<parent>
<groupId>bnymellon.training.spring.framework</groupId>
<artifactId>spring-framework</artifactId>
<version>1.0.0</version>
<version>2.0.0</version>
</parent>
<artifactId>ch03_spring-testing</artifactId>
<version>1.0.0</version>
<version>2.0.0</version>

<!-- Instruction to hint that we are producing a jar file -->
<packaging>jar</packaging>

<name>Spring Framework - Testing</name>
<description>Testing with Spring</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- The properties below ensure that the code is picked up and compiled as Java 11 -->
<java.version>11</java.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencyManagement>
<dependencies>

Expand Down
13 changes: 1 addition & 12 deletions spring-framework/ch04_spring-persistence/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,16 @@
<parent>
<groupId>bnymellon.training.spring.framework</groupId>
<artifactId>spring-framework</artifactId>
<version>1.0.0</version>
<version>2.0.0</version>
</parent>
<artifactId>ch04_spring-persistence</artifactId>
<version>1.0.0</version>

<!-- Instruction to hint that we are producing a jar file -->
<packaging>jar</packaging>

<name>Spring Framework - Persistence (JDBC)</name>
<description>Database Persistence with Spring</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- The properties below ensure that the code is picked up and compiled as Java 11 -->
<java.version>11</java.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencyManagement>
<dependencies>

Expand Down
26 changes: 10 additions & 16 deletions spring-framework/ch05_spring-hibernate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,16 @@
<parent>
<groupId>bnymellon.training.spring.framework</groupId>
<artifactId>spring-framework</artifactId>
<version>1.0.0</version>
<version>2.0.0</version>
</parent>
<artifactId>ch05_spring-hibernate</artifactId>
<version>1.0.0</version>

<!-- Instruction to hint that we are producing a jar file -->
<packaging>jar</packaging>

<name>Spring Framework - Persistence (Hibernate)</name>
<description>Database Persistence with Spring and Hibernate</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- The properties below ensure that the code is picked up and compiled as Java 11 -->
<java.version>11</java.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencyManagement>
<dependencies>

Expand Down Expand Up @@ -80,6 +69,11 @@
</exclusions>
</dependency>

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

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
Expand All @@ -91,13 +85,13 @@
</dependency>

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jaxb-api.version}</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
package bnymellon.training.spring.framework.model;


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;
import java.io.Serializable;

@Entity
Expand Down
28 changes: 11 additions & 17 deletions spring-framework/ch06_spring-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,16 @@
<parent>
<groupId>bnymellon.training.spring.framework</groupId>
<artifactId>spring-framework</artifactId>
<version>1.0.0</version>
<version>2.0.0</version>
</parent>
<artifactId>ch06_spring-jpa</artifactId>
<version>1.0.0</version>

<!-- Instruction to hint that we are producing a jar file -->
<packaging>jar</packaging>

<name>Spring Framework - Persistence (JPA)</name>
<description>Database Persistence with Spring JPA</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- The properties below ensure that the code is picked up and compiled as Java 11 -->
<java.version>11</java.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencyManagement>
<dependencies>

Expand Down Expand Up @@ -91,21 +80,26 @@
</dependency>

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jaxb-api.version}</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
</dependency>

<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
<version>5.6.15.Final</version>
</dependency>

<!-- H2 DB -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package bnymellon.training.spring.framework.config;

import javax.persistence.EntityManagerFactory;
import jakarta.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import java.util.Properties;

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

package bnymellon.training.spring.framework.dao;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

package bnymellon.training.spring.framework.model;

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;
import java.io.Serializable;

@Entity
Expand Down
32 changes: 12 additions & 20 deletions spring-framework/ch07_spring-data-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,16 @@
<parent>
<groupId>bnymellon.training.spring.framework</groupId>
<artifactId>spring-framework</artifactId>
<version>1.0.0</version>
<version>2.0.0</version>
</parent>
<artifactId>ch07_spring-data-jpa</artifactId>
<version>1.0.0</version>

<!-- Instruction to hint that we are producing a jar file -->
<packaging>jar</packaging>

<name>Spring Framework - Persistence (Spring Data JPA)</name>
<description>Database Persistence with Spring Data JPA</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- The properties below ensure that the code is picked up and compiled as Java 11 -->
<java.version>11</java.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

<spring-data-jpa.version>1.10.6.RELEASE</spring-data-jpa.version>
</properties>

<dependencyManagement>
<dependencies>

Expand Down Expand Up @@ -79,7 +66,7 @@
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>${spring-data-jpa.version}</version>
<version>${spring-data.jpa}</version>
</dependency>

<dependency>
Expand All @@ -93,21 +80,26 @@
</dependency>

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jaxb-api.version}</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
</dependency>

<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
<version>5.6.15.Final</version>
</dependency>

<!-- H2 DB -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package bnymellon.training.spring.framework.config;

import javax.persistence.EntityManagerFactory;
import jakarta.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import java.util.Properties;

Expand Down
Loading
Loading