Skip to content

Commit

Permalink
bump spring and use AutoConfiguration.imports
Browse files Browse the repository at this point in the history
spring factories is deprecated by spring boot 2.7 and completely removed in 3.0+
  • Loading branch information
ahmedhus committed Oct 29, 2023
1 parent f7efc7b commit 51d7e78
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions opentracing-spring-tracer-configuration-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
io.opentracing.contrib.spring.tracer.configuration.TracerAutoConfiguration,\
io.opentracing.contrib.spring.tracer.configuration.TracerAutoConfiguration
io.opentracing.contrib.spring.tracer.configuration.TracerRegisterAutoConfiguration
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@SpringBootTest(
classes = {
BaseTest.SpringConfiguration.class,
TracerAutoConfigurationTest.SpringConfiguration.class})
@RunWith(SpringJUnit4ClassRunner.class)
@DirtiesContext
public class TracerAutoConfigurationTest extends BaseTest {

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@SpringBootTest(
Expand All @@ -32,6 +33,7 @@
TracerAutoConfigurationWithWrapperAndRegisteredTracerTest.SpringConfiguration.class,
TestTracerBeanPostProcessor.class})
@RunWith(SpringJUnit4ClassRunner.class)
@DirtiesContext
public class TracerAutoConfigurationWithWrapperAndRegisteredTracerTest extends BaseTest {

@BeforeClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@SpringBootTest(
classes = {
BaseTest.SpringConfiguration.class,
TestTracerBeanPostProcessor.class})
@RunWith(SpringJUnit4ClassRunner.class)
@DirtiesContext
public class TracerAutoConfigurationWithWrapperTest extends BaseTest {

@Autowired
Expand Down
4 changes: 1 addition & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.basedir>${project.basedir}</main.basedir>

<!-- spring-boot-starter-parent is a module of spring-boot-dependencies
https://github.com/spring-projects/spring-boot/blob/master/spring-boot-starters/spring-boot-starter-parent/pom.xml -->
<version.org.springframework.boot>2.3.4.RELEASE</version.org.springframework.boot>
<version.org.springframework.boot>2.7.17</version.org.springframework.boot>
<version.io.opentracing.contrib-opentracing-tracerresolver>0.1.8</version.io.opentracing.contrib-opentracing-tracerresolver>
<version.io.opentracing>0.33.0</version.io.opentracing>
<version.junit>4.12</version.junit>
Expand Down

0 comments on commit 51d7e78

Please sign in to comment.