Skip to content

Update spring core to v6 (major) #2644

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

Merged
merged 5 commits into from
Jan 6, 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
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- [Spring] Upgrade to Spring Boot 3 and Spring 6 ([#2644](https://github.com/cucumber/cucumber-jvm/pull/2644) M.P. Korstanje)

### Changed
- [Core] Use a [message based JUnit XML Formatter](https://github.com/cucumber/cucumber-junit-xml-formatter) ([#2638](https://github.com/cucumber/cucumber-jvm/pull/2638) M.P. Korstanje)
- [Core] Throw an exception when tag expressions are incorrectly escaped ([tag-expressions/#17](https://github.com/cucumber/tag-expressions/pull/17) Aslak Hellesøy)
- [DeltaSpike] Un-Deprecated deltaspike - can be made to work on Java 17.
- [DeltaSpike] Un-Deprecated deltaspike - can be made to work on Java 17 ([#2674](https://github.com/cucumber/cucumber-jvm/pull/2674) M.P. Korstanje)

### Fixed
- [Core] Improve test step creation performance ([#2666](https://github.com/cucumber/cucumber-jvm/issues/2666), Julien Kronegg)


## [7.10.1] - 2022-12-16
### Fixed
- [Spring] Inject CucumberContextConfiguration constructor dependencies ([#2664](https://github.com/cucumber/cucumber-jvm/pull/2664) M.P. Korstanje)
Expand Down
22 changes: 1 addition & 21 deletions cucumber-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
<properties>
<apiguardian-api.version>1.1.2</apiguardian-api.version>
<hamcrest.version>2.2</hamcrest.version>
<javax.servlet-api.version>4.0.1</javax.servlet-api.version>
<junit-jupiter.version>5.9.1</junit-jupiter.version>
<spring.version>5.3.24</spring.version>
<spring.version>6.0.3</spring.version>
<project.Automatic-Module-Name>io.cucumber.spring</project.Automatic-Module-Name>
<mockito.version>4.11.0</mockito.version>
</properties>
Expand Down Expand Up @@ -65,25 +64,6 @@
<version>${apiguardian-api.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${javax.servlet-api.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.web.WebAppConfiguration;

@WebAppConfiguration
@ContextConfiguration("classpath:cucumber.xml")
@CucumberContextConfiguration
public class AnnotationContextConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

import io.cucumber.java.en.Then;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.context.ApplicationContext;

import static org.junit.jupiter.api.Assertions.assertNotNull;

public class AnnotationContextConfigurationDefinitions {

@Autowired
private WebApplicationContext wac;
private ApplicationContext context;

@Then("cucumber picks up configuration class without step defs")
public void pickUpContext() {
assertNotNull(wac);
assertNotNull(context);
}

}
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
package io.cucumber.spring.beans;

import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.stereotype.Controller;

@Component
@RequestMapping(TestController.BASE_URL)
@Controller
public class TestController {

public static final String BASE_URL = "/test";

@ResponseBody
@RequestMapping(method = RequestMethod.GET)
public String test() {
return "ok";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import static org.junit.jupiter.api.Assertions.assertSame;

@CucumberContextConfiguration
@WebAppConfiguration
@ContextConfiguration("classpath:cucumber.xml")
public class ThreadingStepDefinitions {

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 9 additions & 2 deletions examples/spring-java-junit5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

<properties>
<project.Automatic-Module-Name>io.cucumber.examples.spring.application</project.Automatic-Module-Name>
<spring-boot.version>2.6.0</spring-boot.version>
<junit-jupiter.version>5.8.2</junit-jupiter.version>
<spring-boot.version>3.0.1</spring-boot.version>
<junit-jupiter.version>5.9.1</junit-jupiter.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -96,6 +96,13 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<parameters>true</parameters>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package io.cucumber.examples.spring.application;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import jakarta.persistence.Access;
import jakarta.persistence.AccessType;
import jakarta.persistence.Basic;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;

import java.io.Serializable;
import java.util.StringJoiner;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package io.cucumber.examples.spring.application;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import jakarta.persistence.Access;
import jakarta.persistence.AccessType;
import jakarta.persistence.Basic;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;

import java.io.Serializable;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
spring:
jpa:
open-in-view: false