rewrite-spring

The rewrite-spring module publishes 327 recipes across 13 categories.

spring › ai1

Composite recipes

Migrate Spring AI properties to 1.0

io.arconia.rewrite.spring.ai1.UpgradeSpringAiProperties_1_0

Migrate Spring AI configuration properties that were renamed or deprecated in the 1.0 release, across YAML and Properties configuration files.

Tags: spring, ai

Recipes applied

Example

Before
spring.ai.chat.memory.jdbc.initialize-schema=false
spring.ai.chat.client.observations.include-input=true
spring.ai.mistralai.chat.enabled=true
After
spring.ai.chat.memory.repository.jdbc.initialize-schema=never
spring.ai.chat.client.observations.log-prompt=true

Migrate Spring AI properties to 1.0 (generated)

io.arconia.rewrite.spring.ai1.UpgradeSpringAiPropertiesGenerated_1_0

Migrate Spring AI configuration properties that were renamed or deprecated in the 1.0 release, across YAML and Properties configuration files.

Tags: spring, ai

Recipes applied

Migrate Spring AI properties to 1.1

io.arconia.rewrite.spring.ai1.UpgradeSpringAiProperties_1_1

Migrate Spring AI configuration properties that were renamed or deprecated in the 1.1 release, across YAML and Properties configuration files.

Tags: spring, ai

Recipes applied

Example

Before
spring.ai.ollama.chat.options.use-n-u-m-a=true
spring.ai.ollama.chat.options.low-v-r-a-m=true
spring.ai.ollama.chat.options.f16-k-v=true
spring.ai.ollama.chat.options.logits-all=true
spring.ai.ollama.chat.options.vocab-only=true
spring.ai.ollama.chat.options.use-m-lock=true
spring.ai.ollama.chat.options.tfs-z=true
spring.ai.ollama.chat.options.mirostat=true
spring.ai.ollama.chat.options.mirostat-tau=true
spring.ai.ollama.chat.options.mirostat-eta=true
spring.ai.ollama.chat.options.penalize-newline=true
After
# Deprecated. Not supported by Ollama Server any longer.
# spring.ai.ollama.chat.options.use-n-u-m-a=true
# Deprecated. Not supported by Ollama Server any longer.
# spring.ai.ollama.chat.options.low-v-r-a-m=true
# Deprecated. Not supported by Ollama Server any longer.
# spring.ai.ollama.chat.options.f16-k-v=true
# Deprecated. Not supported by Ollama Server any longer.
# spring.ai.ollama.chat.options.logits-all=true
# Deprecated. Not supported by Ollama Server any longer.
# spring.ai.ollama.chat.options.vocab-only=true
# Deprecated. Not supported by Ollama Server any longer.
# spring.ai.ollama.chat.options.use-m-lock=true
# Deprecated. Not supported by Ollama Server any longer.
# spring.ai.ollama.chat.options.tfs-z=true
# Deprecated. Not supported by Ollama Server any longer.
# spring.ai.ollama.chat.options.mirostat=true
# Deprecated. Not supported by Ollama Server any longer.
# spring.ai.ollama.chat.options.mirostat-tau=true
# Deprecated. Not supported by Ollama Server any longer.
# spring.ai.ollama.chat.options.mirostat-eta=true
# Deprecated. Not supported by Ollama Server any longer.
# spring.ai.ollama.chat.options.penalize-newline=true

Migrate the Spring AI Bedrock module to Spring AI 1.1

io.arconia.rewrite.spring.ai1.MigrateSpringAiBedrock_1_1

Update usages of Spring AI Bedrock APIs that were renamed in Spring AI 1.1.

Recipes applied
  • Change method name (org.openrewrite.java.ChangeMethodName)

Migrate the Spring AI MCP module to Spring AI 1.1

io.arconia.rewrite.spring.ai1.MigrateSpringAiMcp_1_1

Update Spring AI MCP client and server dependencies and relocated auto-configuration types for Spring AI 1.1.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency ×2)

  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency ×4)

  • Change type (org.openrewrite.java.ChangeType ×16)

Migrate the Spring AI Model module to Spring AI 1.1

io.arconia.rewrite.spring.ai1.MigrateSpringAiModel_1_1

Update usages of Spring AI Model APIs that were relocated or renamed in Spring AI 1.1.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×6)

Migrate to Spring AI 1.0

io.arconia.rewrite.spring.ai1.UpgradeSpringAi_1_0

Migrate a Spring Boot application to the latest Spring AI 1.0.x release.

Tags: spring, ai

Recipes applied

Example

Before
package com.yourorg;

import org.springframework.ai.evaluation.FactCheckingEvaluator;

class Demo {
    FactCheckingEvaluator factCheckingEvaluator = null;
}
After
package com.yourorg;

import org.springframework.ai.chat.evaluation.FactCheckingEvaluator;

class Demo {
    FactCheckingEvaluator factCheckingEvaluator = null;
}

Migrate to Spring AI 1.1

io.arconia.rewrite.spring.ai1.UpgradeSpringAi_1_1

Migrate a Spring Boot application to the latest Spring AI 1.1.x release.

Tags: spring, ai

Recipes applied

Example

Before
plugins {
    id "java-library"
}

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.springframework.ai:spring-ai-autoconfigure-mcp-client"
    implementation "org.springframework.ai:spring-ai-autoconfigure-mcp-server"
}
After
plugins {
    id "java-library"
}

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.springframework.ai:spring-ai-autoconfigure-mcp-client-common"
    implementation "org.springframework.ai:spring-ai-autoconfigure-mcp-server-common"
}

Recipes

Use AssistantMessage.Builder instead of constructor

io.arconia.rewrite.spring.ai1.UseAssistantMessageBuilder

Replace new AssistantMessage(…​) with AssistantMessage.builder()…​.build().

Example

Before
import org.springframework.ai.chat.messages.AssistantMessage;

import java.util.List;
import java.util.Map;

class Demo {
    void test() {
        AssistantMessage message1 = new AssistantMessage("content");
        AssistantMessage message2 = new AssistantMessage("content", Map.of());
        AssistantMessage message3 = new AssistantMessage("content", Map.of(), List.of());
        AssistantMessage message4 = new AssistantMessage("content", Map.of(), List.of(), List.of());
    }
}
After
import org.springframework.ai.chat.messages.AssistantMessage;

import java.util.List;
import java.util.Map;

class Demo {
    void test() {
        AssistantMessage message1 = AssistantMessage.builder().content("content").build();
        AssistantMessage message2 = AssistantMessage.builder().content("content").properties(Map.of()).build();
        AssistantMessage message3 = AssistantMessage.builder().content("content").properties(Map.of()).toolCalls(List.of()).build();
        AssistantMessage message4 = AssistantMessage.builder().content("content").properties(Map.of()).toolCalls(List.of()).media(List.of()).build();
    }
}

Use EmbeddingOptions.builder() instead of EmbeddingOptionsBuilder.builder()

io.arconia.rewrite.spring.ai1.UseEmbeddingOptionsBuilder

Replace EmbeddingOptionsBuilder.builder() with EmbeddingOptions.builder().

Example

Before
import org.springframework.ai.embedding.EmbeddingOptions;
import org.springframework.ai.embedding.EmbeddingOptionsBuilder;

class Demo {
    EmbeddingOptions test() {
        return EmbeddingOptionsBuilder.builder().build();
    }
}
After
import org.springframework.ai.embedding.EmbeddingOptions;

class Demo {
    EmbeddingOptions test() {
        return EmbeddingOptions.builder().build();
    }
}

Use QuestionAnswerAdvisor.Builder instead of constructor

io.arconia.rewrite.spring.ai1.UseQuestionAnswerAdvisorBuilder

Replace new QuestionAnswerAdvisor(vectorStore) with QuestionAnswerAdvisor.builder(vectorStore).build().

Example

Before
import org.springframework.ai.chat.client.advisor.vectorstore.QuestionAnswerAdvisor;
import org.springframework.ai.vectorstore.VectorStore;

class Demo {
    QuestionAnswerAdvisor test(VectorStore vectorStore) {
        return new QuestionAnswerAdvisor(vectorStore);
    }
}
After
import org.springframework.ai.chat.client.advisor.vectorstore.QuestionAnswerAdvisor;
import org.springframework.ai.vectorstore.VectorStore;

class Demo {
    QuestionAnswerAdvisor test(VectorStore vectorStore) {
        return QuestionAnswerAdvisor.builder(vectorStore).build();
    }
}

Use ToolResponseMessage.Builder instead of constructor

io.arconia.rewrite.spring.ai1.UseToolResponseMessageBuilder

Replace new ToolResponseMessage(…​) with ToolResponseMessage.builder()…​.build().

Example

Before
import org.springframework.ai.chat.messages.ToolResponseMessage;

import java.util.List;
import java.util.Map;

class Demo {
    void test() {
        ToolResponseMessage message1 = new ToolResponseMessage(List.of());
        ToolResponseMessage message2 = new ToolResponseMessage(List.of(), Map.of());
    }
}
After
import org.springframework.ai.chat.messages.ToolResponseMessage;

import java.util.List;
import java.util.Map;

class Demo {
    void test() {
        ToolResponseMessage message1 = ToolResponseMessage.builder().responses(List.of()).build();
        ToolResponseMessage message2 = ToolResponseMessage.builder().responses(List.of()).metadata(Map.of()).build();
    }
}

spring › ai2

Composite recipes

Migrate Spring AI properties to 2.0

io.arconia.rewrite.spring.ai2.UpgradeSpringAiProperties_2_0

Migrate Spring AI configuration properties that were renamed or deprecated in the 2.0 release, across YAML and Properties configuration files.

Tags: spring, ai

Recipes applied

Migrate Spring AI properties to 2.0 (generated)

io.arconia.rewrite.spring.ai2.UpgradeSpringAiPropertiesGenerated_2_0

Migrate Spring AI configuration properties that were renamed or deprecated in the 2.0 release, across YAML and Properties configuration files.

Tags: spring, ai

Recipes applied

Migrate Spring AI properties to 2.1

io.arconia.rewrite.spring.ai2.UpgradeSpringAiProperties_2_1

Migrate Spring AI configuration properties that were renamed or deprecated in the 2.1 release, across YAML and Properties configuration files.

Tags: spring, ai

Recipes applied

Migrate Spring AI properties to 2.1 (generated)

io.arconia.rewrite.spring.ai2.UpgradeSpringAiPropertiesGenerated_2_1

Migrate Spring AI configuration properties that were renamed or deprecated in the 2.1 release, across YAML and Properties configuration files.

Tags: spring, ai

Recipes applied

Migrate the Spring AI Anthropic module to Spring AI 2.1

io.arconia.rewrite.spring.ai2.MigrateSpringAiAnthropic_2_1

Update usages of Spring AI Anthropic APIs that were deprecated in Spring AI 2.1. Anthropic API version 2026-10-21 rejects sampling options, so they are removed from AnthropicChatOptions builders.

Recipes applied

Migrate the Spring AI DeepSeek module to Spring AI 2.1

io.arconia.rewrite.spring.ai2.MigrateSpringAiDeepSeek_2_1

Replace the DeepSeekAssistantMessage.prefixAssistantMessage factory methods, removed in Spring AI 2.1, with the equivalent DeepSeekAssistantMessage.builder() chain.

Recipes applied

Migrate the Spring AI MCP module to Spring AI 2.1

io.arconia.rewrite.spring.ai2.MigrateSpringAiMcp_2_1

Update usages of Spring AI MCP APIs that were deprecated for removal in Spring AI 2.1. The toolCallExceptionClass parameter of the MCP tool method callbacks is no longer used, since exception dispatch became type-based in Spring AI 2.0.1, so the constructors that accept it give way to the three-argument ones.

Recipes applied
  • Delete method argument (org.openrewrite.java.DeleteMethodArgument ×4)

Migrate to Spring AI 2.0

io.arconia.rewrite.spring.ai2.UpgradeSpringAi_2_0

Migrate a Spring Boot application to the latest Spring AI 2.0.x release.

Tags: spring, ai

Recipes applied

Example

Before
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.prompt.ChatOptions;

class Demo {
    void test(ChatClient chatClient) {
        chatClient.prompt()
                .options(ChatOptions.builder()
                        .temperature(0.2)
                        .build())
                .call()
                .content();
    }
}
After
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.prompt.ChatOptions;

class Demo {
    void test(ChatClient chatClient) {
        chatClient.prompt()
                .options(ChatOptions.builder()
                        .temperature(0.2))
                .call()
                .content();
    }
}

Migrate to Spring AI 2.1

io.arconia.rewrite.spring.ai2.UpgradeSpringAi_2_1

Migrate a Spring Boot application to the latest Spring AI 2.1.x release.

Tags: spring, ai

Recipes applied

Example

Before
import java.lang.reflect.Method;

import org.springframework.ai.mcp.annotation.method.tool.AsyncMcpToolMethodCallback;
import org.springframework.ai.mcp.annotation.method.tool.ReturnMode;
import org.springframework.ai.mcp.annotation.method.tool.SyncMcpToolMethodCallback;

class Demo {
    SyncMcpToolMethodCallback sync(Method method, Object provider) {
        return new SyncMcpToolMethodCallback(ReturnMode.TEXT, method, provider, Exception.class);
    }

    AsyncMcpToolMethodCallback async(Method method, Object provider) {
        return new AsyncMcpToolMethodCallback(ReturnMode.TEXT, method, provider, RuntimeException.class);
    }
}
After
import java.lang.reflect.Method;

import org.springframework.ai.mcp.annotation.method.tool.AsyncMcpToolMethodCallback;
import org.springframework.ai.mcp.annotation.method.tool.ReturnMode;
import org.springframework.ai.mcp.annotation.method.tool.SyncMcpToolMethodCallback;

class Demo {
    SyncMcpToolMethodCallback sync(Method method, Object provider) {
        return new SyncMcpToolMethodCallback(ReturnMode.TEXT, method, provider);
    }

    AsyncMcpToolMethodCallback async(Method method, Object provider) {
        return new AsyncMcpToolMethodCallback(ReturnMode.TEXT, method, provider);
    }
}

Recipes

Pass ChatOptions.Builder to ChatClient options methods

io.arconia.rewrite.spring.ai2.UseChatOptionsBuilder

Remove .build() from ChatOptions builder chains passed to ChatClient.options() and ChatClient.Builder.defaultOptions(), as these methods now accept ChatOptions.Builder directly in Spring AI 2.0.

Example

Before
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.prompt.ChatOptions;

class Demo {
    void test(ChatClient chatClient) {
        chatClient.prompt()
                .options(ChatOptions.builder()
                        .temperature(0.2)
                        .build())
                .call()
                .content();
    }
}
After
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.prompt.ChatOptions;

class Demo {
    void test(ChatClient chatClient) {
        chatClient.prompt()
                .options(ChatOptions.builder()
                        .temperature(0.2))
                .call()
                .content();
    }
}

Remove the sampling options from AnthropicChatOptions builders

io.arconia.rewrite.spring.ai2.RemoveAnthropicSamplingOptions

Remove the temperature, topP, and topK calls from AnthropicChatOptions builders. Anthropic API version 2026-10-21, used by Spring AI 2.1, rejects these options, so Spring AI discards their values and logs a warning. The builders of other model providers are left unchanged.

Use OpenAiChatModel.ResponseFormat.builder(…​) instead of constructor

io.arconia.rewrite.spring.ai2.UseOpenAiResponseFormatBuilder

Replace new ResponseFormat(type, jsonSchema) with OpenAiChatModel.ResponseFormat.builder().type(type).jsonSchema(jsonSchema).build().

Use OpenAiEmbeddingOptions.EncodingFormat enum constants

io.arconia.rewrite.spring.ai2.UseOpenAiEmbeddingEncodingFormatEnum

Replace OpenAiEmbeddingOptions.Builder.encodingFormat(String) literal calls such as .encodingFormat("float") with the matching OpenAiEmbeddingOptions.EncodingFormat enum constant.

Example

Before
import org.springframework.ai.openai.OpenAiEmbeddingOptions;

class Demo {
    OpenAiEmbeddingOptions test() {
        return OpenAiEmbeddingOptions.builder()
                .encodingFormat("float")
                .build();
    }
}
After
import org.springframework.ai.openai.OpenAiEmbeddingOptions;

class Demo {
    OpenAiEmbeddingOptions test() {
        return OpenAiEmbeddingOptions.builder()
                .encodingFormat(OpenAiEmbeddingOptions.EncodingFormat.FLOAT)
                .build();
    }
}

Use TokenTextSplitter.builder() instead of constructor

io.arconia.rewrite.spring.ai2.UseTokenTextSplitterBuilder

Replace the deprecated new TokenTextSplitter(…​) constructors with TokenTextSplitter.builder()…​.build().

Example

Before
import java.util.List;

import org.springframework.ai.document.Document;
import org.springframework.ai.transformer.splitter.TokenTextSplitter;

class Demo {
    List<Document> split(List<Document> documents) {
        return new TokenTextSplitter().split(documents);
    }
}
After
import java.util.List;

import org.springframework.ai.document.Document;
import org.springframework.ai.transformer.splitter.TokenTextSplitter;

class Demo {
    List<Document> split(List<Document> documents) {
        return TokenTextSplitter.builder().build().split(documents);
    }
}

Use the DeepSeekAssistantMessage builder instead of prefixAssistantMessage

io.arconia.rewrite.spring.ai2.UseDeepSeekAssistantMessageBuilder

Replace the DeepSeekAssistantMessage.prefixAssistantMessage factory methods, removed in Spring AI 2.1, with the equivalent DeepSeekAssistantMessage.builder() chain.

spring › ai2 › mcp

Recipes

Use McpSchema.GetPromptResult.builder(…​) instead of constructor

io.arconia.rewrite.spring.ai2.mcp.UseGetPromptResultBuilder

Replace new McpSchema.GetPromptResult(description, messages) with McpSchema.GetPromptResult.builder(messages).description(description).build().

Example

Before
import io.modelcontextprotocol.spec.McpSchema;

import java.util.List;

class Demo {
    McpSchema.GetPromptResult test(String description, List<McpSchema.PromptMessage> messages) {
        return new McpSchema.GetPromptResult(description, messages);
    }
}
After
import io.modelcontextprotocol.spec.McpSchema;

import java.util.List;

class Demo {
    McpSchema.GetPromptResult test(String description, List<McpSchema.PromptMessage> messages) {
        return McpSchema.GetPromptResult.builder(messages).description(description).build();
    }
}

Use McpSchema.ProgressNotification.builder(…​) instead of constructor

io.arconia.rewrite.spring.ai2.mcp.UseProgressNotificationBuilder

Replace new McpSchema.ProgressNotification(token, progress, total, message) with McpSchema.ProgressNotification.builder(token, progress).total(total).message(message).build().

Example

Before
import io.modelcontextprotocol.spec.McpSchema;

class Demo {
    McpSchema.ProgressNotification test(Object token, double progress, Double total, String message) {
        return new McpSchema.ProgressNotification(token, progress, total, message);
    }
}
After
import io.modelcontextprotocol.spec.McpSchema;

class Demo {
    McpSchema.ProgressNotification test(Object token, double progress, Double total, String message) {
        return McpSchema.ProgressNotification.builder(token, progress).total(total).message(message).build();
    }
}

Use McpSchema.ReadResourceResult.builder(…​) instead of constructor

io.arconia.rewrite.spring.ai2.mcp.UseReadResourceResultBuilder

Replace new McpSchema.ReadResourceResult(contents) with McpSchema.ReadResourceResult.builder(contents).build().

Example

Before
import io.modelcontextprotocol.spec.McpSchema;

import java.util.List;

class Demo {
    McpSchema.ReadResourceResult test(List<McpSchema.ResourceContents> contents) {
        return new McpSchema.ReadResourceResult(contents);
    }
}
After
import io.modelcontextprotocol.spec.McpSchema;

import java.util.List;

class Demo {
    McpSchema.ReadResourceResult test(List<McpSchema.ResourceContents> contents) {
        return McpSchema.ReadResourceResult.builder(contents).build();
    }
}

Use McpSchema.TextContent.builder(…​) instead of constructor

io.arconia.rewrite.spring.ai2.mcp.UseTextContentBuilder

Replace new McpSchema.TextContent(text) with McpSchema.TextContent.builder(text).build().

Example

Before
import io.modelcontextprotocol.spec.McpSchema;

class Demo {
    McpSchema.TextContent test() {
        return new McpSchema.TextContent("hello");
    }
}
After
import io.modelcontextprotocol.spec.McpSchema;

class Demo {
    McpSchema.TextContent test() {
        return McpSchema.TextContent.builder("hello").build();
    }
}

spring › boot3

Composite recipes

Migrate Spring Boot properties to 3.5

io.arconia.rewrite.spring.boot3.UpgradeSpringBootProperties_3_5

Migrate Spring Boot configuration properties that were renamed or deprecated in the 3.5 release, across YAML and Properties configuration files.

Tags: spring, boot

Recipes applied

Migrate Spring Boot properties to 3.5 (generated)

io.arconia.rewrite.spring.boot3.UpgradeSpringBootPropertiesGenerated_3_5

Migrate Spring Boot configuration properties that were renamed or deprecated in the 3.5 release, across YAML and Properties configuration files.

Tags: spring, boot

Recipes applied

Migrate to Spring Boot 3.5

io.arconia.rewrite.spring.boot3.UpgradeSpringBoot_3_5

Migrate a Spring Boot application to the latest Spring Boot 3.5.x release.

Tags: spring, boot

Recipes applied

spring › boot4

Composite recipes

Add AMQP Starter Test

io.arconia.rewrite.spring.boot4.AddAmqpStarterTest

Add AMQP Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add ActiveMQ Starter Test

io.arconia.rewrite.spring.boot4.AddActiveMqStarterTest

Add ActiveMQ Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Actuator Starter Test

io.arconia.rewrite.spring.boot4.AddActuatorStarterTest

Add Actuator Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Artemis Starter Test

io.arconia.rewrite.spring.boot4.AddArtemisStarterTest

Add Artemis Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add AspectJ Starter Test

io.arconia.rewrite.spring.boot4.AddAspectjStarterTest

Add AspectJ Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Batch JDBC Starter Test

io.arconia.rewrite.spring.boot4.AddBatchJdbcStarterTest

Add Batch JDBC Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Batch Starter Test

io.arconia.rewrite.spring.boot4.AddBatchStarterTest

Add Batch Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Cache Starter Test

io.arconia.rewrite.spring.boot4.AddCacheStarterTest

Add Cache Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Cassandra Starter Test

io.arconia.rewrite.spring.boot4.AddCassandraStarterTest

Add Cassandra Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Cloud Foundry Starter Test

io.arconia.rewrite.spring.boot4.AddCloudFoundryStarterTest

Add Cloud Foundry Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Couchbase Starter Test

io.arconia.rewrite.spring.boot4.AddCouchbaseStarterTest

Add Couchbase Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data Cassandra Reactive Starter Test

io.arconia.rewrite.spring.boot4.AddDataCassandraReactiveStarterTest

Add Data Cassandra Reactive Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data Cassandra Starter Test

io.arconia.rewrite.spring.boot4.AddDataCassandraStarterTest

Add Data Cassandra Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data Couchbase Reactive Starter Test

io.arconia.rewrite.spring.boot4.AddDataCouchbaseReactiveStarterTest

Add Data Couchbase Reactive Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data Couchbase Starter Test

io.arconia.rewrite.spring.boot4.AddDataCouchbaseStarterTest

Add Data Couchbase Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data Elasticsearch Starter Test

io.arconia.rewrite.spring.boot4.AddDataElasticsearchStarterTest

Add Data Elasticsearch Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data JDBC Starter Test

io.arconia.rewrite.spring.boot4.AddDataJdbcStarterTest

Add Data JDBC Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data JPA Starter Test

io.arconia.rewrite.spring.boot4.AddDataJpaStarterTest

Add Data JPA Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data LDAP Starter Test

io.arconia.rewrite.spring.boot4.AddDataLdapStarterTest

Add Data LDAP Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data MongoDB Reactive Starter Test

io.arconia.rewrite.spring.boot4.AddDataMongoDbReactiveStarterTest

Add Data MongoDB Reactive Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data MongoDB Starter Test

io.arconia.rewrite.spring.boot4.AddDataMongoDbStarterTest

Add Data MongoDB Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data Neo4j Starter Test

io.arconia.rewrite.spring.boot4.AddDataNeo4jStarterTest

Add Data Neo4j Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data R2DBC Starter Test

io.arconia.rewrite.spring.boot4.AddDataR2dbcStarterTest

Add Data R2DBC Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data REST Starter Test

io.arconia.rewrite.spring.boot4.AddDataRestStarterTest

Add Data REST Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data Redis Reactive Starter Test

io.arconia.rewrite.spring.boot4.AddDataRedisReactiveStarterTest

Add Data Redis Reactive Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Data Redis Starter Test

io.arconia.rewrite.spring.boot4.AddDataRedisStarterTest

Add Data Redis Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Elasticsearch Starter Test

io.arconia.rewrite.spring.boot4.AddElasticsearchStarterTest

Add Elasticsearch Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Flyway Starter

io.arconia.rewrite.spring.boot4.AddFlywayStarter

Add Flyway Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Add Flyway Starter Test

io.arconia.rewrite.spring.boot4.AddFlywayStarterTest

Add Flyway Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Freemarker Starter Test

io.arconia.rewrite.spring.boot4.AddFreemarkerStarterTest

Add Freemarker Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add GraphQL Starter Test

io.arconia.rewrite.spring.boot4.AddGraphQlStarterTest

Add GraphQL Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Groovy Templates Starter Test

io.arconia.rewrite.spring.boot4.AddGroovyTemplatesStarterTest

Add Groovy Templates Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Gson Starter

io.arconia.rewrite.spring.boot4.AddGsonStarter

Add Gson Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Gson Starter Test

io.arconia.rewrite.spring.boot4.AddGsonStarterTest

Add Gson Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add HATEOAS Starter Test

io.arconia.rewrite.spring.boot4.AddHateoasStarterTest

Add HATEOAS Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Hazelcast Starter

io.arconia.rewrite.spring.boot4.AddHazelcastStarter

Add Hazelcast Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Add Hazelcast Starter Test

io.arconia.rewrite.spring.boot4.AddHazelcastStarterTest

Add Hazelcast Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Integration Starter Test

io.arconia.rewrite.spring.boot4.AddIntegrationStarterTest

Add Integration Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add JDBC Starter Test

io.arconia.rewrite.spring.boot4.AddJdbcStarterTest

Add JDBC Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add JMS Starter

io.arconia.rewrite.spring.boot4.AddJmsStarter

Add JMS Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Add JMS Starter Test

io.arconia.rewrite.spring.boot4.AddJmsStarterTest

Add JMS Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add JSONB Starter Test

io.arconia.rewrite.spring.boot4.AddJsonbStarterTest

Add JSONB Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Jackson Starter

io.arconia.rewrite.spring.boot4.AddJacksonStarter

Add Jackson Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Jackson Starter Test

io.arconia.rewrite.spring.boot4.AddJacksonStarterTest

Add Jackson Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Jersey Starter Test

io.arconia.rewrite.spring.boot4.AddJerseyStarterTest

Add Jersey Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Kafka Starter

io.arconia.rewrite.spring.boot4.AddKafkaStarter

Add Kafka Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Add Kafka Starter Test

io.arconia.rewrite.spring.boot4.AddKafkaStarterTest

Add Kafka Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Kotlin Serialization Starter Test

io.arconia.rewrite.spring.boot4.AddKotlinSerializationStarterTest

Add Kotlin Serialization Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add LDAP Starter Test

io.arconia.rewrite.spring.boot4.AddLdapStarterTest

Add LDAP Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Liquibase Starter

io.arconia.rewrite.spring.boot4.AddLiquibaseStarter

Add Liquibase Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Add Liquibase Starter Test

io.arconia.rewrite.spring.boot4.AddLiquibaseStarterTest

Add Liquibase Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Mail Starter Test

io.arconia.rewrite.spring.boot4.AddMailStarterTest

Add Mail Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Micrometer Metrics Starter Test

io.arconia.rewrite.spring.boot4.AddMicrometerMetricsStarterTest

Add Micrometer Metrics Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Micrometer Tracing Starter Test

io.arconia.rewrite.spring.boot4.AddMicrometerTracingStarterTest

Add Micrometer Tracing Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add MongoDB Starter Test

io.arconia.rewrite.spring.boot4.AddMongoDbStarterTest

Add MongoDB Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Mustache Starter Test

io.arconia.rewrite.spring.boot4.AddMustacheStarterTest

Add Mustache Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Neo4j Starter Test

io.arconia.rewrite.spring.boot4.AddNeo4jStarterTest

Add Neo4j Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add OpenTelemetry Starter Test

io.arconia.rewrite.spring.boot4.AddOpenTelemetryStarterTest

Add OpenTelemetry Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Remove a Gradle or Maven dependency (org.openrewrite.java.dependencies.RemoveDependency ×5)

Add OpenTelemetry Starter for Metrics

io.arconia.rewrite.spring.boot4.AddOpenTelemetryStarterForMetrics

Add OpenTelemetry Starter for Metrics.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add OpenTelemetry Starter for Tracing

io.arconia.rewrite.spring.boot4.AddOpenTelemetryStarterForTracing

Add OpenTelemetry Starter for Tracing.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Pulsar Starter Test

io.arconia.rewrite.spring.boot4.AddPulsarStarterTest

Add Pulsar Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Quartz Starter Test

io.arconia.rewrite.spring.boot4.AddQuartzStarterTest

Add Quartz Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add R2DBC Starter Test

io.arconia.rewrite.spring.boot4.AddR2dbcStarterTest

Add R2DBC Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add RSocket Starter Test

io.arconia.rewrite.spring.boot4.AddRsocketStarterTest

Add RSocket Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add RestClient Starter

io.arconia.rewrite.spring.boot4.AddRestClientStarter

Add RestClient Starter.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency ×2)

Add RestClient Starter Test

io.arconia.rewrite.spring.boot4.AddRestClientStarterTest

Add RestClient Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add RestTestClient Module

io.arconia.rewrite.spring.boot4.AddRestTestClientModule

Add RestTestClient Module.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency ×2)

Add Security OAuth2 Authorization Server Starter Test

io.arconia.rewrite.spring.boot4.AddSecurityOAuth2AuthorizationServerStarterTest

Add Security OAuth2 Authorization Server Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Security OAuth2 Client Starter Test

io.arconia.rewrite.spring.boot4.AddSecurityOAuth2ClientStarterTest

Add Security OAuth2 Client Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Security OAuth2 Resource Server Starter Test

io.arconia.rewrite.spring.boot4.AddSecurityOAuth2ResourceServerStarterTest

Add Security OAuth2 Resource Server Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Security SAML Starter

io.arconia.rewrite.spring.boot4.AddSecuritySamlStarter

Add Security SAML Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Add Security SAML Starter Test

io.arconia.rewrite.spring.boot4.AddSecuritySamlStarterTest

Add Security SAML Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Security Starter Test

io.arconia.rewrite.spring.boot4.AddSecurityStarterTest

Add Security Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add SendGrid Starter Test

io.arconia.rewrite.spring.boot4.AddSendGridStarterTest

Add SendGrid Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Session Data Redis Starter

io.arconia.rewrite.spring.boot4.AddSessionDataRedisStarter

Add Session Data Redis Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Add Session Data Redis Starter Test

io.arconia.rewrite.spring.boot4.AddSessionDataRedisStarterTest

Add Session Data Redis Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Session JDBC Starter

io.arconia.rewrite.spring.boot4.AddSessionJdbcStarter

Add Session JDBC Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Add Session JDBC Starter Test

io.arconia.rewrite.spring.boot4.AddSessionJdbcStarterTest

Add Session JDBC Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Thymeleaf Starter Test

io.arconia.rewrite.spring.boot4.AddThymeleafStarterTest

Add Thymeleaf Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Validation Starter Test

io.arconia.rewrite.spring.boot4.AddValidationStarterTest

Add Validation Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Web MVC Starter Test

io.arconia.rewrite.spring.boot4.AddWebMvcStarterTest

Add Web MVC Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Web Services Starter Test

io.arconia.rewrite.spring.boot4.AddWebServicesStarterTest

Add Web Services Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add WebClient Starter

io.arconia.rewrite.spring.boot4.AddWebClientStarter

Add WebClient Starter.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add WebClient Starter Test

io.arconia.rewrite.spring.boot4.AddWebClientStarterTest

Add WebClient Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add WebFlux Starter Test

io.arconia.rewrite.spring.boot4.AddWebFluxStarterTest

Add WebFlux Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add WebSocket Starter Test

io.arconia.rewrite.spring.boot4.AddWebSocketStarterTest

Add WebSocket Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add WebTestClient Module

io.arconia.rewrite.spring.boot4.AddWebTestClientModule

Add WebTestClient Module.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Add Zipkin Starter

io.arconia.rewrite.spring.boot4.AddZipkinStarter

Add Zipkin Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Add Zipkin Starter Test

io.arconia.rewrite.spring.boot4.AddZipkinStarterTest

Add Zipkin Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Remove a Gradle or Maven dependency (org.openrewrite.java.dependencies.RemoveDependency)

Add jOOQ Starter Test

io.arconia.rewrite.spring.boot4.AddJooqStarterTest

Add jOOQ Starter Test.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Migrate AMQP Test

io.arconia.rewrite.spring.boot4.MigrateAmqpTest

Migrate AMQP Test.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Migrate AspectJ Starter

io.arconia.rewrite.spring.boot4.MigrateAspectjStarter

Migrate AspectJ Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Migrate Batch Test

io.arconia.rewrite.spring.boot4.MigrateBatchTest

Migrate Batch Test.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Migrate GraphQL Test

io.arconia.rewrite.spring.boot4.MigrateGraphQlTest

Migrate GraphQL Test.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Migrate Kafka Test

io.arconia.rewrite.spring.boot4.MigrateKafkaTest

Migrate Kafka Test.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Migrate Kotlinx Serialization JSON Starter

io.arconia.rewrite.spring.boot4.MigrateKotlinxSerializationJsonStarter

Migrate Kotlinx Serialization JSON Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Migrate Kotlinx Serialization JSON Starter Test

io.arconia.rewrite.spring.boot4.MigrateKotlinxSerializationJsonStarterTest

Migrate Kotlinx Serialization JSON Starter Test.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Migrate Security OAuth2 Authorization Server Starter

io.arconia.rewrite.spring.boot4.MigrateSecurityOAuth2AuthorizationServerStarter

Migrate Security OAuth2 Authorization Server Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Migrate Security OAuth2 Client Starter

io.arconia.rewrite.spring.boot4.MigrateSecurityOAuth2ClientStarter

Migrate Security OAuth2 Client Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Migrate Security OAuth2 Resource Server Starter

io.arconia.rewrite.spring.boot4.MigrateSecurityOAuth2ResourceServerStarter

Migrate Security OAuth2 Resource Server Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Migrate Security Test

io.arconia.rewrite.spring.boot4.MigrateSecurityTest

Migrate Security Test.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Migrate Spring Boot AMQP module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateAmqpModule

Migrate Spring Boot AMQP module to Spring Boot 4.0.

Recipes applied
  • Migrate AMQP Test (io.arconia.rewrite.spring.boot4.MigrateAmqpTest)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add AMQP Starter Test (io.arconia.rewrite.spring.boot4.AddAmqpStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType ×4)

Example

Before
import org.springframework.boot.actuate.autoconfigure.amqp.RabbitHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.amqp.RabbitMetricsAutoConfiguration;
import org.springframework.boot.actuate.amqp.RabbitHealthIndicator;
import org.springframework.boot.actuate.metrics.amqp.RabbitMetrics;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;

class Demo {
    RabbitHealthContributorAutoConfiguration autoConfiguration = null;
    RabbitMetricsAutoConfiguration metricsAutoConfiguration = null;
    RabbitHealthIndicator healthIndicator = null;
    RabbitMetrics metrics = null;
    RabbitAutoConfiguration rabbitAutoConfiguration = null;
}
After
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
import org.springframework.boot.amqp.autoconfigure.health.RabbitHealthContributorAutoConfiguration;
import org.springframework.boot.amqp.autoconfigure.metrics.RabbitMetricsAutoConfiguration;
import org.springframework.boot.amqp.health.RabbitHealthIndicator;
import org.springframework.boot.amqp.metrics.RabbitMetrics;

class Demo {
    RabbitHealthContributorAutoConfiguration autoConfiguration = null;
    RabbitMetricsAutoConfiguration metricsAutoConfiguration = null;
    RabbitHealthIndicator healthIndicator = null;
    RabbitMetrics metrics = null;
    RabbitAutoConfiguration rabbitAutoConfiguration = null;
}

Migrate Spring Boot ActiveMQ module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateActiveMqModule

Migrate Spring Boot ActiveMQ module to Spring Boot 4.0.

Recipes applied
  • Add ActiveMQ Starter Test (io.arconia.rewrite.spring.boot4.AddActiveMqStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×4)

Example

Before
import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration;
import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQConnectionDetails;
import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQConnectionFactoryCustomizer;
import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQProperties;

class Demo {
    ActiveMQAutoConfiguration autoConfiguration = null;
    ActiveMQConnectionDetails connectionDetails = null;
    ActiveMQConnectionFactoryCustomizer connectionFactoryCustomizer = null;
    ActiveMQProperties properties = null;
}
After
import org.springframework.boot.activemq.autoconfigure.ActiveMQAutoConfiguration;
import org.springframework.boot.activemq.autoconfigure.ActiveMQConnectionDetails;
import org.springframework.boot.activemq.autoconfigure.ActiveMQConnectionFactoryCustomizer;
import org.springframework.boot.activemq.autoconfigure.ActiveMQProperties;

class Demo {
    ActiveMQAutoConfiguration autoConfiguration = null;
    ActiveMQConnectionDetails connectionDetails = null;
    ActiveMQConnectionFactoryCustomizer connectionFactoryCustomizer = null;
    ActiveMQProperties properties = null;
}

Migrate Spring Boot Actuator module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateActuatorModule

Migrate Spring Boot Actuator module to Spring Boot 4.0.

Recipes applied
  • Add Actuator Starter Test (io.arconia.rewrite.spring.boot4.AddActuatorStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Migrate Spring Boot Artemis module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateArtemisModule

Migrate Spring Boot Artemis module to Spring Boot 4.0.

Recipes applied
  • Add Artemis Starter Test (io.arconia.rewrite.spring.boot4.AddArtemisStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×6)

Example

Before
import org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration;
import org.springframework.boot.autoconfigure.jms.artemis.ArtemisConfigurationCustomizer;
import org.springframework.boot.autoconfigure.jms.artemis.ArtemisConnectionDetails;
import org.springframework.boot.autoconfigure.jms.artemis.ArtemisMode;
import org.springframework.boot.autoconfigure.jms.artemis.ArtemisNoOpBindingRegistry;
import org.springframework.boot.autoconfigure.jms.artemis.ArtemisProperties;

class Demo {
    ArtemisAutoConfiguration autoConfiguration = null;
    ArtemisConfigurationCustomizer configurationCustomizer = null;
    ArtemisConnectionDetails connectionDetails = null;
    ArtemisMode mode = null;
    ArtemisNoOpBindingRegistry noOpBindingRegistry = null;
    ArtemisProperties properties = null;
}
After
import org.springframework.boot.artemis.autoconfigure.*;

class Demo {
    ArtemisAutoConfiguration autoConfiguration = null;
    ArtemisConfigurationCustomizer configurationCustomizer = null;
    ArtemisConnectionDetails connectionDetails = null;
    ArtemisMode mode = null;
    ArtemisNoOpBindingRegistry noOpBindingRegistry = null;
    ArtemisProperties properties = null;
}

Migrate Spring Boot AspectJ module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateAspectjModule

Migrate Spring Boot AspectJ module to Spring Boot 4.0.

Recipes applied
  • Migrate AspectJ Starter (io.arconia.rewrite.spring.boot4.MigrateAspectjStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add AspectJ Starter Test (io.arconia.rewrite.spring.boot4.AddAspectjStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Example

Before
plugins {
    id 'java-library'
}

repositories {
    mavenCentral()
}

dependencies {
    testImplementation "org.springframework.boot:spring-boot-starter-aop"
}
After
plugins {
    id 'java-library'
}

repositories {
    mavenCentral()
}

dependencies {
    testImplementation "org.springframework.boot:spring-boot-starter-aspectj"
    testImplementation "org.springframework.boot:spring-boot-starter-aspectj-test"
}

Migrate Spring Boot Batch JDBC module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateBatchJdbcModule

Migrate Spring Boot Batch JDBC module to Spring Boot 4.0.

Recipes applied
  • Add Batch JDBC Starter Test (io.arconia.rewrite.spring.boot4.AddBatchJdbcStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×2)

Example

Before
import org.springframework.boot.autoconfigure.batch.BatchDataSource;
import org.springframework.boot.autoconfigure.batch.BatchDataSourceScriptDatabaseInitializer;

class Demo {
    BatchDataSource batchDataSource = null;
    BatchDataSourceScriptDatabaseInitializer batchDataSourceScriptDatabaseInitializer = null;
}
After
import org.springframework.boot.batch.jdbc.autoconfigure.BatchDataSource;
import org.springframework.boot.batch.jdbc.autoconfigure.BatchDataSourceScriptDatabaseInitializer;

class Demo {
    BatchDataSource batchDataSource = null;
    BatchDataSourceScriptDatabaseInitializer batchDataSourceScriptDatabaseInitializer = null;
}

Migrate Spring Boot Batch module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateBatchModule

Migrate Spring Boot Batch module to Spring Boot 4.0.

Recipes applied
  • Migrate Batch Test (io.arconia.rewrite.spring.boot4.MigrateBatchTest)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Batch Starter Test (io.arconia.rewrite.spring.boot4.AddBatchStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×9)

Example

Before
import org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration;
import org.springframework.boot.autoconfigure.batch.BatchConversionServiceCustomizer;
import org.springframework.boot.autoconfigure.batch.BatchProperties;
import org.springframework.boot.autoconfigure.batch.BatchTaskExecutor;
import org.springframework.boot.autoconfigure.batch.BatchTransactionManager;
import org.springframework.boot.autoconfigure.batch.JobExecutionEvent;
import org.springframework.boot.autoconfigure.batch.JobExecutionExitCodeGenerator;
import org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner;
import org.springframework.boot.actuate.autoconfigure.observation.batch.BatchObservationAutoConfiguration;

class Demo {
    BatchAutoConfiguration autoConfiguration = null;
    BatchConversionServiceCustomizer conversionServiceCustomizer = null;
    BatchProperties properties = null;
    BatchTaskExecutor taskExecutor = null;
    BatchTransactionManager transactionManager = null;
    JobExecutionEvent jobExecutionEvent = null;
    JobExecutionExitCodeGenerator jobExecutionExitCodeGenerator = null;
    JobLauncherApplicationRunner jobLauncherApplicationRunner = null;
    BatchObservationAutoConfiguration batchObservationAutoConfiguration = null;
}
After
import org.springframework.boot.batch.autoconfigure.*;
import org.springframework.boot.batch.autoconfigure.observation.BatchObservationAutoConfiguration;

class Demo {
    BatchAutoConfiguration autoConfiguration = null;
    BatchConversionServiceCustomizer conversionServiceCustomizer = null;
    BatchProperties properties = null;
    BatchTaskExecutor taskExecutor = null;
    BatchTransactionManager transactionManager = null;
    JobExecutionEvent jobExecutionEvent = null;
    JobExecutionExitCodeGenerator jobExecutionExitCodeGenerator = null;
    JobLauncherApplicationRunner jobLauncherApplicationRunner = null;
    BatchObservationAutoConfiguration batchObservationAutoConfiguration = null;
}

Migrate Spring Boot Cache module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateCacheModule

Migrate Spring Boot Cache module to Spring Boot 4.0.

Recipes applied
  • Add Cache Starter Test (io.arconia.rewrite.spring.boot4.AddCacheStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage ×2)

  • Change type (org.openrewrite.java.ChangeType ×2)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType)

Example

Before
import org.springframework.boot.actuate.cache.CachesEndpoint;
import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.cache.CachesEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.cache.CacheMetricsAutoConfiguration;
import org.springframework.boot.actuate.metrics.cache.CacheMeterBinderProvider;
import org.springframework.boot.test.autoconfigure.core.AutoConfigureCache;

class Demo {
    CachesEndpoint cachesEndpoint = null;
    CacheAutoConfiguration cacheAutoConfiguration = null;
    CachesEndpointAutoConfiguration cachesEndpointAutoConfiguration = null;
    CacheMetricsAutoConfiguration cacheMetricsAutoConfiguration = null;
    CacheMeterBinderProvider cacheMeterBinderProvider = null;
    AutoConfigureCache autoConfigureCache = null;
}
After
import org.springframework.boot.cache.actuate.endpoint.CachesEndpoint;
import org.springframework.boot.cache.autoconfigure.CacheAutoConfiguration;
import org.springframework.boot.cache.autoconfigure.CachesEndpointAutoConfiguration;
import org.springframework.boot.cache.autoconfigure.metrics.CacheMetricsAutoConfiguration;
import org.springframework.boot.cache.metrics.CacheMeterBinderProvider;
import org.springframework.boot.cache.test.autoconfigure.AutoConfigureCache;

class Demo {
    CachesEndpoint cachesEndpoint = null;
    CacheAutoConfiguration cacheAutoConfiguration = null;
    CachesEndpointAutoConfiguration cachesEndpointAutoConfiguration = null;
    CacheMetricsAutoConfiguration cacheMetricsAutoConfiguration = null;
    CacheMeterBinderProvider cacheMeterBinderProvider = null;
    AutoConfigureCache autoConfigureCache = null;
}

Migrate Spring Boot Cassandra module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateCassandraModule

Migrate Spring Boot Cassandra module to Spring Boot 4.0.

Recipes applied
  • Add Cassandra Starter Test (io.arconia.rewrite.spring.boot4.AddCassandraStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage ×3)

Example

Before
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.cassandra.CassandraHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.cassandra.CassandraDriverHealthIndicator;

class Demo {
    CassandraAutoConfiguration autoConfiguration = null;
    CassandraHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    CassandraDriverHealthIndicator healthIndicator = null;
}
After
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.health.CassandraHealthContributorAutoConfiguration;
import org.springframework.boot.cassandra.health.CassandraDriverHealthIndicator;

class Demo {
    CassandraAutoConfiguration autoConfiguration = null;
    CassandraHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    CassandraDriverHealthIndicator healthIndicator = null;
}

Migrate Spring Boot Cloud Foundry module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateCloudFoundryModule

Migrate Spring Boot Cloud Foundry module to Spring Boot 4.0.

Recipes applied
  • Add Cloud Foundry Starter Test (io.arconia.rewrite.spring.boot4.AddCloudFoundryStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.CloudFoundryWebEndpointDiscoverer;
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.servlet.CloudFoundryActuatorAutoConfiguration;

class Demo {
    CloudFoundryWebEndpointDiscoverer webEndpointDiscoverer = null;
    CloudFoundryActuatorAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.cloudfoundry.autoconfigure.actuate.endpoint.CloudFoundryWebEndpointDiscoverer;
import org.springframework.boot.cloudfoundry.autoconfigure.actuate.endpoint.servlet.CloudFoundryActuatorAutoConfiguration;

class Demo {
    CloudFoundryWebEndpointDiscoverer webEndpointDiscoverer = null;
    CloudFoundryActuatorAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot Core module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateCoreModule

Migrate Spring Boot Core module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×2)

  • Find and replace (org.openrewrite.text.FindAndReplace)

  • Change type (org.openrewrite.java.ChangeType ×3)

Example

Before
import org.springframework.boot.BootstrapRegistry;
import org.springframework.boot.env.EnvironmentPostProcessor;
import org.springframework.boot.test.autoconfigure.properties.PropertyMapping;

class Demo {
    BootstrapRegistry bootstrapRegistry = null;
    EnvironmentPostProcessor environmentPostProcessor = null;
    PropertyMapping propertyMapping = null;
}
After
import org.springframework.boot.EnvironmentPostProcessor;
import org.springframework.boot.bootstrap.BootstrapRegistry;
import org.springframework.boot.test.context.PropertyMapping;

class Demo {
    BootstrapRegistry bootstrapRegistry = null;
    EnvironmentPostProcessor environmentPostProcessor = null;
    PropertyMapping propertyMapping = null;
}
Before
org.springframework.boot.env.EnvironmentPostProcessor=io.arconia.openinference.observation.autoconfigure.ai.OpenInferenceEnvironmentPostProcessor
After
org.springframework.boot.EnvironmentPostProcessor=io.arconia.openinference.observation.autoconfigure.ai.OpenInferenceEnvironmentPostProcessor

Migrate Spring Boot Couchbase module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateCouchbaseModule

Migrate Spring Boot Couchbase module to Spring Boot 4.0.

Recipes applied
  • Add Couchbase Starter Test (io.arconia.rewrite.spring.boot4.AddCouchbaseStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage ×3)

Example

Before
import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.couchbase.CouchbaseHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.couchbase.CouchbaseHealthIndicator;

class Demo {
    CouchbaseAutoConfiguration autoConfiguration = null;
    CouchbaseHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    CouchbaseHealthIndicator healthIndicator = null;
}
After
import org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration;
import org.springframework.boot.couchbase.autoconfigure.health.CouchbaseHealthContributorAutoConfiguration;
import org.springframework.boot.couchbase.health.CouchbaseHealthIndicator;

class Demo {
    CouchbaseAutoConfiguration autoConfiguration = null;
    CouchbaseHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    CouchbaseHealthIndicator healthIndicator = null;
}

Migrate Spring Boot Data Cassandra module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateDataCassandraModule

Migrate Spring Boot Data Cassandra module to Spring Boot 4.0.

Recipes applied
  • Add Data Cassandra Starter Test (io.arconia.rewrite.spring.boot4.AddDataCassandraStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Add Data Cassandra Reactive Starter Test (io.arconia.rewrite.spring.boot4.AddDataCassandraReactiveStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×6)

Example

Before
import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.cassandra.CassandraReactiveDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.cassandra.CassandraReactiveRepositoriesAutoConfiguration;
import org.springframework.boot.autoconfigure.data.cassandra.CassandraRepositoriesAutoConfiguration;
import org.springframework.boot.test.autoconfigure.data.cassandra.AutoConfigureDataCassandra;
import org.springframework.boot.test.autoconfigure.data.cassandra.DataCassandraTest;

class Demo {
    CassandraDataAutoConfiguration autoConfiguration = null;
    CassandraReactiveDataAutoConfiguration reactiveAutoConfiguration = null;
    CassandraReactiveRepositoriesAutoConfiguration reactiveRepositoriesAutoConfiguration = null;
    CassandraRepositoriesAutoConfiguration repositoriesAutoConfiguration = null;
    AutoConfigureDataCassandra autoConfigureDataCassandra = null;
    DataCassandraTest dataCassandraTest = null;
}
After
import org.springframework.boot.data.cassandra.autoconfigure.DataCassandraAutoConfiguration;
import org.springframework.boot.data.cassandra.autoconfigure.DataCassandraReactiveAutoConfiguration;
import org.springframework.boot.data.cassandra.autoconfigure.DataCassandraReactiveRepositoriesAutoConfiguration;
import org.springframework.boot.data.cassandra.autoconfigure.DataCassandraRepositoriesAutoConfiguration;
import org.springframework.boot.data.cassandra.test.autoconfigure.AutoConfigureDataCassandra;
import org.springframework.boot.data.cassandra.test.autoconfigure.DataCassandraTest;

class Demo {
    DataCassandraAutoConfiguration autoConfiguration = null;
    DataCassandraReactiveAutoConfiguration reactiveAutoConfiguration = null;
    DataCassandraReactiveRepositoriesAutoConfiguration reactiveRepositoriesAutoConfiguration = null;
    DataCassandraRepositoriesAutoConfiguration repositoriesAutoConfiguration = null;
    AutoConfigureDataCassandra autoConfigureDataCassandra = null;
    DataCassandraTest dataCassandraTest = null;
}

Migrate Spring Boot Data Commons module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateDataCommonsModule

Migrate Spring Boot Data Commons module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×9)

Example

Before
import org.springframework.boot.actuate.autoconfigure.metrics.data.RepositoryMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.PropertiesAutoTimer;
import org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration;
import org.springframework.boot.autoconfigure.data.web.SpringDataWebProperties;
import org.springframework.boot.actuate.metrics.AutoTimer;
import org.springframework.boot.actuate.metrics.data.DefaultRepositoryTagsProvider;
import org.springframework.boot.actuate.metrics.data.MetricsRepositoryMethodInvocationListener;
import org.springframework.boot.actuate.metrics.data.RepositoryTagsProvider;
import org.springframework.boot.actuate.metrics.annotation.TimedAnnotations;

class Demo {
    RepositoryMetricsAutoConfiguration autoConfiguration = null;
    PropertiesAutoTimer propertiesAutoTimer = null;
    SpringDataWebAutoConfiguration springDataWebAutoConfiguration = null;
    SpringDataWebProperties springDataWebProperties = null;
    AutoTimer autoTimer = null;
    DefaultRepositoryTagsProvider defaultRepositoryTagsProvider = null;
    MetricsRepositoryMethodInvocationListener metricsRepositoryMethodInvocationListener = null;
    RepositoryTagsProvider repositoryTagsProvider = null;
    TimedAnnotations timedAnnotations = null;
}
After
import org.springframework.boot.data.autoconfigure.metrics.DataRepositoryMetricsAutoConfiguration;
import org.springframework.boot.data.autoconfigure.metrics.PropertiesAutoTimer;
import org.springframework.boot.data.autoconfigure.web.DataWebAutoConfiguration;
import org.springframework.boot.data.autoconfigure.web.DataWebProperties;
import org.springframework.boot.data.metrics.*;

class Demo {
    DataRepositoryMetricsAutoConfiguration autoConfiguration = null;
    PropertiesAutoTimer propertiesAutoTimer = null;
    DataWebAutoConfiguration springDataWebAutoConfiguration = null;
    DataWebProperties springDataWebProperties = null;
    AutoTimer autoTimer = null;
    DefaultRepositoryTagsProvider defaultRepositoryTagsProvider = null;
    MetricsRepositoryMethodInvocationListener metricsRepositoryMethodInvocationListener = null;
    RepositoryTagsProvider repositoryTagsProvider = null;
    TimedAnnotations timedAnnotations = null;
}

Migrate Spring Boot Data Couchbase module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateDataCouchbaseModule

Migrate Spring Boot Data Couchbase module to Spring Boot 4.0.

Recipes applied
  • Add Data Couchbase Starter Test (io.arconia.rewrite.spring.boot4.AddDataCouchbaseStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Add Data Couchbase Reactive Starter Test (io.arconia.rewrite.spring.boot4.AddDataCouchbaseReactiveStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×7)

Example

Before
import org.springframework.boot.autoconfigure.data.couchbase.CouchbaseDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.couchbase.CouchbaseDataProperties;
import org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveRepositoriesAutoConfiguration;
import org.springframework.boot.autoconfigure.data.couchbase.CouchbaseRepositoriesAutoConfiguration;
import org.springframework.boot.test.autoconfigure.data.couchbase.AutoConfigureDataCouchbase;
import org.springframework.boot.test.autoconfigure.data.couchbase.DataCouchbaseTest;

class Demo {
    CouchbaseDataAutoConfiguration autoConfiguration = null;
    CouchbaseDataProperties properties = null;
    CouchbaseReactiveDataAutoConfiguration reactiveAutoConfiguration = null;
    CouchbaseReactiveRepositoriesAutoConfiguration reactiveRepositoriesAutoConfiguration = null;
    CouchbaseRepositoriesAutoConfiguration repositoriesAutoConfiguration = null;
    AutoConfigureDataCouchbase autoConfigureDataCouchbase = null;
    DataCouchbaseTest dataCouchbaseTest = null;
}
After
import org.springframework.boot.data.couchbase.autoconfigure.*;
import org.springframework.boot.data.couchbase.test.autoconfigure.AutoConfigureDataCouchbase;
import org.springframework.boot.data.couchbase.test.autoconfigure.DataCouchbaseTest;

class Demo {
    DataCouchbaseAutoConfiguration autoConfiguration = null;
    DataCouchbaseProperties properties = null;
    DataCouchbaseReactiveAutoConfiguration reactiveAutoConfiguration = null;
    DataCouchbaseReactiveRepositoriesAutoConfiguration reactiveRepositoriesAutoConfiguration = null;
    DataCouchbaseRepositoriesAutoConfiguration repositoriesAutoConfiguration = null;
    AutoConfigureDataCouchbase autoConfigureDataCouchbase = null;
    DataCouchbaseTest dataCouchbaseTest = null;
}

Migrate Spring Boot Data Elasticsearch module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateDataElasticsearchModule

Migrate Spring Boot Data Elasticsearch module to Spring Boot 4.0.

Recipes applied
  • Add Data Elasticsearch Starter Test (io.arconia.rewrite.spring.boot4.AddDataElasticsearchStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×7)

Example

Before
import org.springframework.boot.actuate.autoconfigure.data.elasticsearch.ElasticsearchReactiveHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.data.elasticsearch.ElasticsearchReactiveHealthIndicator;
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchRepositoriesAutoConfiguration;
import org.springframework.boot.autoconfigure.data.elasticsearch.ReactiveElasticsearchRepositoriesAutoConfiguration;
import org.springframework.boot.test.autoconfigure.data.elasticsearch.AutoConfigureDataElasticsearch;
import org.springframework.boot.test.autoconfigure.data.elasticsearch.DataElasticsearchTest;

class Demo {
    ElasticsearchReactiveHealthContributorAutoConfiguration reactiveHealthContributorAutoConfiguration = null;
    ElasticsearchReactiveHealthIndicator reactiveHealthIndicator = null;
    ElasticsearchDataAutoConfiguration dataAutoConfiguration = null;
    ElasticsearchRepositoriesAutoConfiguration repositoriesAutoConfiguration = null;
    ReactiveElasticsearchRepositoriesAutoConfiguration reactiveRepositoriesAutoConfiguration = null;
    AutoConfigureDataElasticsearch autoConfigureDataElasticsearch = null;
    DataElasticsearchTest dataElasticsearchTest = null;
}
After
import org.springframework.boot.data.elasticsearch.autoconfigure.DataElasticsearchAutoConfiguration;
import org.springframework.boot.data.elasticsearch.autoconfigure.DataElasticsearchReactiveRepositoriesAutoConfiguration;
import org.springframework.boot.data.elasticsearch.autoconfigure.DataElasticsearchRepositoriesAutoConfiguration;
import org.springframework.boot.data.elasticsearch.autoconfigure.health.DataElasticsearchReactiveHealthContributorAutoConfiguration;
import org.springframework.boot.data.elasticsearch.health.DataElasticsearchReactiveHealthIndicator;
import org.springframework.boot.data.elasticsearch.test.autoconfigure.AutoConfigureDataElasticsearch;
import org.springframework.boot.data.elasticsearch.test.autoconfigure.DataElasticsearchTest;

class Demo {
    DataElasticsearchReactiveHealthContributorAutoConfiguration reactiveHealthContributorAutoConfiguration = null;
    DataElasticsearchReactiveHealthIndicator reactiveHealthIndicator = null;
    DataElasticsearchAutoConfiguration dataAutoConfiguration = null;
    DataElasticsearchReactiveRepositoriesAutoConfiguration repositoriesAutoConfiguration = null;
    DataElasticsearchRepositoriesAutoConfiguration reactiveRepositoriesAutoConfiguration = null;
    AutoConfigureDataElasticsearch autoConfigureDataElasticsearch = null;
    DataElasticsearchTest dataElasticsearchTest = null;
}

Migrate Spring Boot Data JDBC module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateDataJdbcModule

Migrate Spring Boot Data JDBC module to Spring Boot 4.0.

Recipes applied
  • Add Data JDBC Starter Test (io.arconia.rewrite.spring.boot4.AddDataJdbcStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×5)

Example

Before
import org.springframework.boot.test.autoconfigure.data.jdbc.AutoConfigureDataJdbc;
import org.springframework.boot.test.autoconfigure.data.jdbc.DataJdbcTest;

class Demo {
    AutoConfigureDataJdbc autoConfigureDataJdbc = null;
    DataJdbcTest dataJdbcTest = null;
}
After
import org.springframework.boot.data.jdbc.test.autoconfigure.AutoConfigureDataJdbc;
import org.springframework.boot.data.jdbc.test.autoconfigure.DataJdbcTest;

class Demo {
    AutoConfigureDataJdbc autoConfigureDataJdbc = null;
    DataJdbcTest dataJdbcTest = null;
}

Migrate Spring Boot Data JPA module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateDataJpaModule

Migrate Spring Boot Data JPA module to Spring Boot 4.0.

Recipes applied
  • Add Data JPA Starter Test (io.arconia.rewrite.spring.boot4.AddDataJpaStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×3)

Example

Before
import org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration;
import org.springframework.boot.test.autoconfigure.orm.jpa.AutoConfigureDataJpa;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;

class Demo {
    JpaRepositoriesAutoConfiguration autoConfiguration = null;
    AutoConfigureDataJpa autoConfigureDataJpa = null;
    DataJpaTest dataJpaTest = null;
}
After
import org.springframework.boot.data.jpa.autoconfigure.DataJpaRepositoriesAutoConfiguration;
import org.springframework.boot.data.jpa.test.autoconfigure.AutoConfigureDataJpa;
import org.springframework.boot.data.jpa.test.autoconfigure.DataJpaTest;

class Demo {
    DataJpaRepositoriesAutoConfiguration autoConfiguration = null;
    AutoConfigureDataJpa autoConfigureDataJpa = null;
    DataJpaTest dataJpaTest = null;
}

Migrate Spring Boot Data LDAP module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateDataLdapModule

Migrate Spring Boot Data LDAP module to Spring Boot 4.0.

Recipes applied
  • Add Data LDAP Starter Test (io.arconia.rewrite.spring.boot4.AddDataLdapStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×3)

Example

Before
import org.springframework.boot.autoconfigure.data.ldap.LdapRepositoriesAutoConfiguration;
import org.springframework.boot.test.autoconfigure.data.ldap.AutoConfigureDataLdap;
import org.springframework.boot.test.autoconfigure.data.ldap.DataLdapTest;

class Demo {
    LdapRepositoriesAutoConfiguration autoConfiguration = null;
    AutoConfigureDataLdap autoConfigureDataLdap = null;
    DataLdapTest dataLdapTest = null;
}
After
import org.springframework.boot.data.ldap.autoconfigure.DataLdapRepositoriesAutoConfiguration;
import org.springframework.boot.data.ldap.test.autoconfigure.AutoConfigureDataLdap;
import org.springframework.boot.data.ldap.test.autoconfigure.DataLdapTest;

class Demo {
    DataLdapRepositoriesAutoConfiguration autoConfiguration = null;
    AutoConfigureDataLdap autoConfigureDataLdap = null;
    DataLdapTest dataLdapTest = null;
}

Migrate Spring Boot Data MongoDB module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateDataMongoDbModule

Migrate Spring Boot Data MongoDB module to Spring Boot 4.0.

Recipes applied
  • Add Data MongoDB Starter Test (io.arconia.rewrite.spring.boot4.AddDataMongoDbStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Add Data MongoDB Reactive Starter Test (io.arconia.rewrite.spring.boot4.AddDataMongoDbReactiveStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×6)

Example

Before
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.mongo.MongoReactiveDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.mongo.MongoReactiveRepositoriesAutoConfiguration;
import org.springframework.boot.autoconfigure.data.mongo.MongoRepositoriesAutoConfiguration;
import org.springframework.boot.test.autoconfigure.data.mongo.AutoConfigureDataMongo;
import org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest;

class Demo {
    MongoDataAutoConfiguration dataAutoConfiguration = null;
    MongoReactiveDataAutoConfiguration reactiveDataAutoConfiguration = null;
    MongoReactiveRepositoriesAutoConfiguration reactiveRepositoriesAutoConfiguration = null;
    MongoRepositoriesAutoConfiguration repositoriesAutoConfiguration = null;
    AutoConfigureDataMongo autoConfigureDataMongo = null;
    DataMongoTest dataMongoTest = null;
}
After
import org.springframework.boot.data.mongodb.autoconfigure.DataMongoAutoConfiguration;
import org.springframework.boot.data.mongodb.autoconfigure.DataMongoReactiveAutoConfiguration;
import org.springframework.boot.data.mongodb.autoconfigure.DataMongoReactiveRepositoriesAutoConfiguration;
import org.springframework.boot.data.mongodb.autoconfigure.DataMongoRepositoriesAutoConfiguration;
import org.springframework.boot.data.mongodb.test.autoconfigure.AutoConfigureDataMongo;
import org.springframework.boot.data.mongodb.test.autoconfigure.DataMongoTest;

class Demo {
    DataMongoAutoConfiguration dataAutoConfiguration = null;
    DataMongoReactiveAutoConfiguration reactiveDataAutoConfiguration = null;
    DataMongoReactiveRepositoriesAutoConfiguration reactiveRepositoriesAutoConfiguration = null;
    DataMongoRepositoriesAutoConfiguration repositoriesAutoConfiguration = null;
    AutoConfigureDataMongo autoConfigureDataMongo = null;
    DataMongoTest dataMongoTest = null;
}

Migrate Spring Boot Data Neo4j module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateDataNeo4jModule

Migrate Spring Boot Data Neo4j module to Spring Boot 4.0.

Recipes applied
  • Add Data Neo4j Starter Test (io.arconia.rewrite.spring.boot4.AddDataNeo4jStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×7)

Example

Before
import org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataProperties;
import org.springframework.boot.autoconfigure.data.neo4j.Neo4jReactiveDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.neo4j.Neo4jReactiveRepositoriesAutoConfiguration;
import org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoConfiguration;
import org.springframework.boot.test.autoconfigure.data.neo4j.AutoConfigureDataNeo4j;
import org.springframework.boot.test.autoconfigure.data.neo4j.DataNeo4jTest;

class Demo {
    Neo4jDataAutoConfiguration dataAutoConfiguration = null;
    Neo4jDataProperties dataProperties = null;
    Neo4jReactiveDataAutoConfiguration reactiveDataAutoConfiguration = null;
    Neo4jReactiveRepositoriesAutoConfiguration reactiveRepositoriesAutoConfiguration = null;
    Neo4jRepositoriesAutoConfiguration repositoriesAutoConfiguration = null;
    AutoConfigureDataNeo4j autoConfigureDataNeo4j = null;
    DataNeo4jTest dataNeo4jTest = null;
}
After
import org.springframework.boot.data.neo4j.autoconfigure.*;
import org.springframework.boot.data.neo4j.test.autoconfigure.AutoConfigureDataNeo4j;
import org.springframework.boot.data.neo4j.test.autoconfigure.DataNeo4jTest;

class Demo {
    DataNeo4jAutoConfiguration dataAutoConfiguration = null;
    DataNeo4jProperties dataProperties = null;
    DataNeo4jReactiveAutoConfiguration reactiveDataAutoConfiguration = null;
    DataNeo4jReactiveRepositoriesAutoConfiguration reactiveRepositoriesAutoConfiguration = null;
    DataNeo4jRepositoriesAutoConfiguration repositoriesAutoConfiguration = null;
    AutoConfigureDataNeo4j autoConfigureDataNeo4j = null;
    DataNeo4jTest dataNeo4jTest = null;
}

Migrate Spring Boot Data R2DBC module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateDataR2dbcModule

Migrate Spring Boot Data R2DBC module to Spring Boot 4.0.

Recipes applied
  • Add Data R2DBC Starter Test (io.arconia.rewrite.spring.boot4.AddDataR2dbcStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×4)

Example

Before
import org.springframework.boot.autoconfigure.data.r2dbc.R2dbcDataAutoConfiguration;
import org.springframework.boot.test.autoconfigure.data.r2dbc.AutoConfigureDataR2dbc;
import org.springframework.boot.test.autoconfigure.data.r2dbc.DataR2dbcTest;

class Demo {
    R2dbcDataAutoConfiguration autoConfiguration = null;
    AutoConfigureDataR2dbc autoConfigureDataR2dbc = null;
    DataR2dbcTest dataR2dbcTest = null;
}
After
import org.springframework.boot.data.r2dbc.autoconfigure.R2dbcRepositoriesAutoConfiguration;
import org.springframework.boot.data.r2dbc.test.autoconfigure.AutoConfigureDataR2dbc;
import org.springframework.boot.data.r2dbc.test.autoconfigure.DataR2dbcTest;

class Demo {
    R2dbcRepositoriesAutoConfiguration autoConfiguration = null;
    AutoConfigureDataR2dbc autoConfigureDataR2dbc = null;
    DataR2dbcTest dataR2dbcTest = null;
}

Migrate Spring Boot Data REST module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateDataRestModule

Migrate Spring Boot Data REST module to Spring Boot 4.0.

Recipes applied
  • Add Data REST Starter Test (io.arconia.rewrite.spring.boot4.AddDataRestStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×2)

Example

Before
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestProperties;

class Demo {
    RepositoryRestMvcAutoConfiguration autoConfiguration = null;
    RepositoryRestProperties properties = null;
}
After
import org.springframework.boot.data.rest.autoconfigure.DataRestAutoConfiguration;
import org.springframework.boot.data.rest.autoconfigure.DataRestProperties;

class Demo {
    DataRestAutoConfiguration autoConfiguration = null;
    DataRestProperties properties = null;
}

Migrate Spring Boot Data Redis module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateDataRedisModule

Migrate Spring Boot Data Redis module to Spring Boot 4.0.

Recipes applied
  • Add Data Redis Starter Test (io.arconia.rewrite.spring.boot4.AddDataRedisStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Add Data Redis Reactive Starter Test (io.arconia.rewrite.spring.boot4.AddDataRedisReactiveStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×18)

Example

Before
import org.springframework.boot.actuate.autoconfigure.metrics.redis.LettuceMetricsAutoConfiguration;
import org.springframework.boot.actuate.data.redis.RedisHealthIndicator;
import org.springframework.boot.actuate.data.redis.RedisReactiveHealthIndicator;
import org.springframework.boot.autoconfigure.data.redis.ClientResourcesBuilderCustomizer;
import org.springframework.boot.autoconfigure.data.redis.JedisClientConfigurationBuilderCustomizer;
import org.springframework.boot.autoconfigure.data.redis.LettuceClientConfigurationBuilderCustomizer;
import org.springframework.boot.autoconfigure.data.redis.LettuceClientOptionsBuilderCustomizer;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
import org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration;
import org.springframework.boot.test.autoconfigure.data.redis.AutoConfigureDataRedis;
import org.springframework.boot.test.autoconfigure.data.redis.DataRedisTest;

class Demo {
    LettuceMetricsAutoConfiguration lettuceObservationAutoConfiguration = null;
    RedisHealthIndicator dataRedisHealthIndicator = null;
    RedisReactiveHealthIndicator dataRedisReactiveHealthIndicator = null;
    ClientResourcesBuilderCustomizer clientResourcesBuilderCustomizer = null;
    JedisClientConfigurationBuilderCustomizer jedisClientConfigurationBuilderCustomizer = null;
    LettuceClientConfigurationBuilderCustomizer lettuceClientConfigurationBuilderCustomizer = null;
    LettuceClientOptionsBuilderCustomizer lettuceClientOptionsBuilderCustomizer = null;
    RedisAutoConfiguration dataRedisAutoConfiguration = null;
    RedisConnectionDetails dataRedisConnectionDetails = null;
    RedisProperties dataRedisProperties = null;
    RedisReactiveAutoConfiguration dataRedisReactiveAutoConfiguration = null;
    RedisRepositoriesAutoConfiguration dataRedisRepositoriesAutoConfiguration = null;
    AutoConfigureDataRedis autoConfigureDataRedis = null;
    DataRedisTest dataRedisTest = null;
}
After
import org.springframework.boot.data.redis.autoconfigure.*;
import org.springframework.boot.data.redis.autoconfigure.observation.LettuceObservationAutoConfiguration;
import org.springframework.boot.data.redis.health.DataRedisHealthIndicator;
import org.springframework.boot.data.redis.health.DataRedisReactiveHealthIndicator;
import org.springframework.boot.data.redis.test.autoconfigure.AutoConfigureDataRedis;
import org.springframework.boot.data.redis.test.autoconfigure.DataRedisTest;

class Demo {
    LettuceObservationAutoConfiguration lettuceObservationAutoConfiguration = null;
    DataRedisHealthIndicator dataRedisHealthIndicator = null;
    DataRedisReactiveHealthIndicator dataRedisReactiveHealthIndicator = null;
    ClientResourcesBuilderCustomizer clientResourcesBuilderCustomizer = null;
    JedisClientConfigurationBuilderCustomizer jedisClientConfigurationBuilderCustomizer = null;
    LettuceClientConfigurationBuilderCustomizer lettuceClientConfigurationBuilderCustomizer = null;
    LettuceClientOptionsBuilderCustomizer lettuceClientOptionsBuilderCustomizer = null;
    DataRedisAutoConfiguration dataRedisAutoConfiguration = null;
    DataRedisConnectionDetails dataRedisConnectionDetails = null;
    DataRedisProperties dataRedisProperties = null;
    DataRedisReactiveAutoConfiguration dataRedisReactiveAutoConfiguration = null;
    DataRedisRepositoriesAutoConfiguration dataRedisRepositoriesAutoConfiguration = null;
    AutoConfigureDataRedis autoConfigureDataRedis = null;
    DataRedisTest dataRedisTest = null;
}

Migrate Spring Boot Elasticsearch module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateElasticsearchModule

Migrate Spring Boot Elasticsearch module to Spring Boot 4.0.

Recipes applied
  • Add Elasticsearch Starter Test (io.arconia.rewrite.spring.boot4.AddElasticsearchStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×7)

Example

Before
import org.springframework.boot.actuate.autoconfigure.elasticsearch.ElasticsearchRestHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.elasticsearch.ElasticsearchRestClientHealthIndicator;
import org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchConnectionDetails;
import org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchProperties;
import org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration;
import org.springframework.boot.autoconfigure.elasticsearch.ReactiveElasticsearchClientAutoConfiguration;
import org.springframework.boot.autoconfigure.elasticsearch.RestClientBuilderCustomizer;

class Demo {
    ReactiveElasticsearchClientAutoConfiguration reactiveClientAutoConfiguration = null;
    ElasticsearchConnectionDetails connectionDetails = null;
    ElasticsearchProperties properties = null;
    ElasticsearchRestClientAutoConfiguration restClientAutoConfiguration = null;
    RestClientBuilderCustomizer restClientBuilderCustomizer = null;
    ElasticsearchRestHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    ElasticsearchRestClientHealthIndicator healthIndicator = null;
}
After
import org.springframework.boot.elasticsearch.autoconfigure.*;
import org.springframework.boot.elasticsearch.autoconfigure.health.ElasticsearchRestHealthContributorAutoConfiguration;
import org.springframework.boot.elasticsearch.health.ElasticsearchRestClientHealthIndicator;

class Demo {
    ElasticsearchClientAutoConfiguration reactiveClientAutoConfiguration = null;
    ElasticsearchConnectionDetails connectionDetails = null;
    ElasticsearchProperties properties = null;
    ElasticsearchRestClientAutoConfiguration restClientAutoConfiguration = null;
    Rest5ClientBuilderCustomizer restClientBuilderCustomizer = null;
    ElasticsearchRestHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    ElasticsearchRestClientHealthIndicator healthIndicator = null;
}

Migrate Spring Boot Flyway module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateFlywayModule

Migrate Spring Boot Flyway module to Spring Boot 4.0.

Recipes applied
  • Add Flyway Starter (io.arconia.rewrite.spring.boot4.AddFlywayStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Flyway Starter Test (io.arconia.rewrite.spring.boot4.AddFlywayStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×2)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.actuate.autoconfigure.flyway.FlywayEndpointAutoConfiguration;
import org.springframework.boot.actuate.flyway.FlywayEndpoint;
import org.springframework.boot.autoconfigure.flyway.FlywayProperties;

class Demo {
    FlywayEndpointAutoConfiguration endpointAutoConfiguration = null;
    FlywayEndpoint endpoint = null;
    FlywayProperties properties = null;
}
After
import org.springframework.boot.flyway.autoconfigure.FlywayProperties;
import org.springframework.boot.flyway.actuate.endpoint.FlywayEndpoint;
import org.springframework.boot.flyway.autoconfigure.FlywayEndpointAutoConfiguration;

class Demo {
    FlywayEndpointAutoConfiguration endpointAutoConfiguration = null;
    FlywayEndpoint endpoint = null;
    FlywayProperties properties = null;
}

Migrate Spring Boot Freemarker module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateFreemarkerModule

Migrate Spring Boot Freemarker module to Spring Boot 4.0.

Recipes applied
  • Add Freemarker Starter Test (io.arconia.rewrite.spring.boot4.AddFreemarkerStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration;

class Demo {
    FreeMarkerAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.freemarker.autoconfigure.FreeMarkerAutoConfiguration;

class Demo {
    FreeMarkerAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot GraphQL module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateGraphQlModule

Migrate Spring Boot GraphQL module to Spring Boot 4.0.

Recipes applied
  • Migrate GraphQL Test (io.arconia.rewrite.spring.boot4.MigrateGraphQlTest)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add GraphQL Starter Test (io.arconia.rewrite.spring.boot4.AddGraphQlStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType ×3)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.actuate.autoconfigure.observation.graphql.GraphQlObservationAutoConfiguration;
import org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration;
import org.springframework.boot.test.autoconfigure.graphql.AutoConfigureGraphQl;
import org.springframework.boot.test.autoconfigure.graphql.GraphQlTest;
import org.springframework.boot.test.autoconfigure.graphql.tester.AutoConfigureGraphQlTester;

class Demo {
    GraphQlObservationAutoConfiguration observationAutoConfiguration = null;
    GraphQlAutoConfiguration autoConfiguration = null;
    AutoConfigureGraphQl autoConfigureGraphQl = null;
    GraphQlTest graphQlTest = null;
    AutoConfigureGraphQlTester autoConfigureGraphQlTester = null;
}
After
import org.springframework.boot.graphql.autoconfigure.GraphQlAutoConfiguration;
import org.springframework.boot.graphql.autoconfigure.observation.GraphQlObservationAutoConfiguration;
import org.springframework.boot.graphql.test.autoconfigure.AutoConfigureGraphQl;
import org.springframework.boot.graphql.test.autoconfigure.GraphQlTest;
import org.springframework.boot.graphql.test.autoconfigure.tester.AutoConfigureGraphQlTester;

class Demo {
    GraphQlObservationAutoConfiguration observationAutoConfiguration = null;
    GraphQlAutoConfiguration autoConfiguration = null;
    AutoConfigureGraphQl autoConfigureGraphQl = null;
    GraphQlTest graphQlTest = null;
    AutoConfigureGraphQlTester autoConfigureGraphQlTester = null;
}

Migrate Spring Boot Groovy Templates module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateGroovyTemplatesModule

Migrate Spring Boot Groovy Templates module to Spring Boot 4.0.

Recipes applied
  • Add Groovy Templates Starter Test (io.arconia.rewrite.spring.boot4.AddGroovyTemplatesStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration;

class Demo {
    GroovyTemplateAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.groovy.template.autoconfigure.GroovyTemplateAutoConfiguration;

class Demo {
    GroovyTemplateAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot Gson module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateGsonModule

Migrate Spring Boot Gson module to Spring Boot 4.0.

Recipes applied
  • Add Gson Starter (io.arconia.rewrite.spring.boot4.AddGsonStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Add Gson Starter Test (io.arconia.rewrite.spring.boot4.AddGsonStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration;

class Demo {
    GsonAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.gson.autoconfigure.GsonAutoConfiguration;

class Demo {
    GsonAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot H2 Console module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateH2ConsoleModule

Migrate Spring Boot H2 Console module to Spring Boot 4.0.

Recipes applied
  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.autoconfigure.h2.H2ConsoleProperties;

class Demo {
    H2ConsoleProperties h2ConsoleProperties = null;
}
After
import org.springframework.boot.h2console.autoconfigure.H2ConsoleProperties;

class Demo {
    H2ConsoleProperties h2ConsoleProperties = null;
}

Migrate Spring Boot HATEOAS module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateHateoasModule

Migrate Spring Boot HATEOAS module to Spring Boot 4.0.

Recipes applied
  • Add HATEOAS Starter Test (io.arconia.rewrite.spring.boot4.AddHateoasStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.autoconfigure.hateoas.HypermediaAutoConfiguration;

class Demo {
    HypermediaAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.hateoas.autoconfigure.HypermediaAutoConfiguration;

class Demo {
    HypermediaAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot HTTP Client module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateHttpClientModule

Migrate Spring Boot HTTP Client module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×6)

Example

Before
import org.springframework.boot.actuate.autoconfigure.observation.web.client.HttpClientObservationsAutoConfiguration;
import org.springframework.boot.autoconfigure.http.client.ClientHttpRequestFactoryBuilderCustomizer;
import org.springframework.boot.autoconfigure.http.client.HttpClientAutoConfiguration;
import org.springframework.boot.autoconfigure.http.client.HttpClientProperties;
import org.springframework.boot.http.client.ClientHttpRequestFactorySettings;

class Demo {
    ClientHttpRequestFactorySettings clientHttpRequestFactorySettings = null;
    ClientHttpRequestFactoryBuilderCustomizer clientHttpRequestFactoryBuilderCustomizer = null;
    HttpClientAutoConfiguration httpClientAutoConfiguration = null;
    HttpClientProperties httpClientProperties = null;
    HttpClientObservationsAutoConfiguration httpClientObservationsAutoConfiguration = null;
}
After
import org.springframework.boot.http.client.HttpClientSettings;
import org.springframework.boot.http.client.autoconfigure.ClientHttpRequestFactoryBuilderCustomizer;
import org.springframework.boot.http.client.autoconfigure.HttpClientAutoConfiguration;
import org.springframework.boot.http.client.autoconfigure.HttpClientProperties;
import org.springframework.boot.http.client.autoconfigure.metrics.HttpClientMetricsAutoConfiguration;

class Demo {
    HttpClientSettings clientHttpRequestFactorySettings = null;
    ClientHttpRequestFactoryBuilderCustomizer clientHttpRequestFactoryBuilderCustomizer = null;
    HttpClientAutoConfiguration httpClientAutoConfiguration = null;
    HttpClientProperties httpClientProperties = null;
    HttpClientMetricsAutoConfiguration httpClientObservationsAutoConfiguration = null;
}

Migrate Spring Boot HTTP Codec module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateHttpCodecModule

Migrate Spring Boot HTTP Codec module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.autoconfigure.http.codec.CodecsAutoConfiguration;
import org.springframework.boot.web.codec.CodecCustomizer;

class Demo {
    CodecsAutoConfiguration codecsAutoConfiguration = null;
    CodecCustomizer codecCustomizer = null;
}
After
import org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfiguration;
import org.springframework.boot.http.codec.CodecCustomizer;

class Demo {
    CodecsAutoConfiguration codecsAutoConfiguration = null;
    CodecCustomizer codecCustomizer = null;
}

Migrate Spring Boot HTTP Converter module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateHttpConverterModule

Migrate Spring Boot HTTP Converter module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×2)

Example

Before
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;

class Demo {
    HttpMessageConverters httpMessageConverters = null;
    HttpMessageConvertersAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.http.converter.autoconfigure.HttpMessageConverters;
import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration;

class Demo {
    HttpMessageConverters httpMessageConverters = null;
    HttpMessageConvertersAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot Hazelcast module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateHazelcastModule

Migrate Spring Boot Hazelcast module to Spring Boot 4.0.

Recipes applied
  • Add Hazelcast Starter (io.arconia.rewrite.spring.boot4.AddHazelcastStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Hazelcast Starter Test (io.arconia.rewrite.spring.boot4.AddHazelcastStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType ×2)

Example

Before
import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.hazelcast.HazelcastHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.hazelcast.HazelcastHealthIndicator;

class Demo {
    HazelcastAutoConfiguration autoConfiguration = null;
    HazelcastHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    HazelcastHealthIndicator healthIndicator = null;
}
After
import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration;
import org.springframework.boot.hazelcast.autoconfigure.health.HazelcastHealthContributorAutoConfiguration;
import org.springframework.boot.hazelcast.health.HazelcastHealthIndicator;

class Demo {
    HazelcastAutoConfiguration autoConfiguration = null;
    HazelcastHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    HazelcastHealthIndicator healthIndicator = null;
}

Migrate Spring Boot Health module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateHealthModule

Migrate Spring Boot Health module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×11)

  • Rename package name (org.openrewrite.java.ChangePackage ×3)

  • Change type (org.openrewrite.java.ChangeType ×28)

Example

Before
import org.springframework.boot.actuate.autoconfigure.availability.AvailabilityHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.availability.AvailabilityProbesAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.health.CompositeHealthContributorConfiguration;
import org.springframework.boot.actuate.autoconfigure.health.CompositeReactiveHealthContributorConfiguration;
import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator;
import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointProperties;
import org.springframework.boot.actuate.autoconfigure.health.HealthProperties;
import org.springframework.boot.actuate.autoconfigure.ssl.SslHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.ssl.SslHealthIndicatorProperties;
import org.springframework.boot.actuate.autoconfigure.system.DiskSpaceHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.system.DiskSpaceHealthIndicatorProperties;
import org.springframework.boot.actuate.availability.AvailabilityStateHealthIndicator;
import org.springframework.boot.actuate.health.AbstractHealthIndicator;
import org.springframework.boot.actuate.health.AbstractReactiveHealthIndicator;
import org.springframework.boot.actuate.health.AdditionalHealthEndpointPath;
import org.springframework.boot.actuate.health.CompositeHealthContributor;
import org.springframework.boot.actuate.health.CompositeReactiveHealthContributor;
import org.springframework.boot.actuate.health.DefaultHealthContributorRegistry;
import org.springframework.boot.actuate.health.DefaultReactiveHealthContributorRegistry;
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthContributor;
import org.springframework.boot.actuate.health.HealthContributorRegistry;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.HealthEndpointGroup;
import org.springframework.boot.actuate.health.HealthEndpointGroups;
import org.springframework.boot.actuate.health.HealthEndpointGroupsPostProcessor;
import org.springframework.boot.actuate.health.HealthEndpointWebExtension;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.boot.actuate.health.HttpCodeStatusMapper;
import org.springframework.boot.actuate.health.PingHealthIndicator;
import org.springframework.boot.actuate.health.ReactiveHealthContributor;
import org.springframework.boot.actuate.health.ReactiveHealthContributorRegistry;
import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension;
import org.springframework.boot.actuate.health.ReactiveHealthIndicator;
import org.springframework.boot.actuate.health.SimpleHttpCodeStatusMapper;
import org.springframework.boot.actuate.health.SimpleStatusAggregator;
import org.springframework.boot.actuate.health.Status;
import org.springframework.boot.actuate.health.StatusAggregator;
import org.springframework.boot.actuate.ssl.SslHealthIndicator;
import org.springframework.boot.actuate.system.DiskSpaceHealthIndicator;

class Demo {
    AdditionalHealthEndpointPath additionalHealthEndpointPath = null;
    HealthEndpoint healthEndpoint = null;
    HealthEndpointGroup healthEndpointGroup = null;
    HealthEndpointGroups healthEndpointGroups = null;
    HealthEndpointGroupsPostProcessor healthEndpointGroupsPostProcessor = null;
    HealthEndpointWebExtension healthEndpointWebExtension = null;
    HttpCodeStatusMapper httpCodeStatusMapper = null;
    ReactiveHealthEndpointWebExtension reactiveHealthEndpointWebExtension = null;
    SimpleHttpCodeStatusMapper simpleHttpCodeStatusMapper = null;
    SimpleStatusAggregator simpleStatusAggregator = null;
    StatusAggregator statusAggregator = null;
    AvailabilityStateHealthIndicator availabilityStateHealthIndicator = null;
    SslHealthIndicator sslHealthIndicator = null;
    DiskSpaceHealthIndicator diskSpaceHealthIndicator = null;
    AvailabilityProbesAutoConfiguration availabilityProbesAutoConfiguration = null;
    HealthEndpointAutoConfiguration healthEndpointAutoConfiguration = null;
    HealthEndpointProperties healthEndpointProperties = null;
    HealthProperties healthProperties = null;
    AvailabilityHealthContributorAutoConfiguration availabilityHealthContributorAutoConfiguration = null;
    DiskSpaceHealthContributorAutoConfiguration diskSpaceHealthContributorAutoConfiguration = null;
    DiskSpaceHealthIndicatorProperties diskSpaceHealthIndicatorProperties = null;
    SslHealthContributorAutoConfiguration sslHealthContributorAutoConfiguration = null;
    SslHealthIndicatorProperties sslHealthIndicatorProperties = null;
    CompositeHealthContributorConfiguration compositeHealthContributorConfiguration = null;
    CompositeReactiveHealthContributorConfiguration compositeReactiveHealthContributorConfiguration = null;
    ConditionalOnEnabledHealthIndicator conditionalOnEnabledHealthIndicator = null;
    HealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    AbstractHealthIndicator abstractHealthIndicator = null;
    AbstractReactiveHealthIndicator abstractReactiveHealthIndicator = null;
    CompositeHealthContributor compositeHealthContributor = null;
    CompositeReactiveHealthContributor compositeReactiveHealthContributor = null;
    Health health = null;
    HealthContributor healthContributor = null;
    HealthIndicator healthIndicator = null;
    PingHealthIndicator pingHealthIndicator = null;
    ReactiveHealthContributor reactiveHealthContributor = null;
    ReactiveHealthIndicator reactiveHealthIndicator = null;
    Status status = null;
    DefaultHealthContributorRegistry defaultHealthContributorRegistry = null;
    DefaultReactiveHealthContributorRegistry defaultReactiveHealthContributorRegistry = null;
    HealthContributorRegistry healthContributorRegistry = null;
    ReactiveHealthContributorRegistry reactiveHealthContributorRegistry = null;
}
After
import org.springframework.boot.health.application.AvailabilityStateHealthIndicator;
import org.springframework.boot.health.application.SslHealthIndicator;
import org.springframework.boot.health.autoconfigure.actuate.endpoint.AvailabilityProbesAutoConfiguration;
import org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthEndpointAutoConfiguration;
import org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthEndpointProperties;
import org.springframework.boot.health.autoconfigure.actuate.endpoint.HealthProperties;
import org.springframework.boot.health.autoconfigure.application.*;
import org.springframework.boot.health.autoconfigure.contributor.CompositeHealthContributorConfiguration;
import org.springframework.boot.health.autoconfigure.contributor.CompositeReactiveHealthContributorConfiguration;
import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator;
import org.springframework.boot.health.autoconfigure.contributor.HealthContributorAutoConfiguration;
import org.springframework.boot.health.contributor.*;
import org.springframework.boot.health.registry.DefaultHealthContributorRegistry;
import org.springframework.boot.health.registry.DefaultReactiveHealthContributorRegistry;
import org.springframework.boot.health.registry.HealthContributorRegistry;
import org.springframework.boot.health.registry.ReactiveHealthContributorRegistry;
import org.springframework.boot.health.application.DiskSpaceHealthIndicator;
import org.springframework.boot.health.actuate.endpoint.*;

class Demo {
    AdditionalHealthEndpointPath additionalHealthEndpointPath = null;
    HealthEndpoint healthEndpoint = null;
    HealthEndpointGroup healthEndpointGroup = null;
    HealthEndpointGroups healthEndpointGroups = null;
    HealthEndpointGroupsPostProcessor healthEndpointGroupsPostProcessor = null;
    HealthEndpointWebExtension healthEndpointWebExtension = null;
    HttpCodeStatusMapper httpCodeStatusMapper = null;
    ReactiveHealthEndpointWebExtension reactiveHealthEndpointWebExtension = null;
    SimpleHttpCodeStatusMapper simpleHttpCodeStatusMapper = null;
    SimpleStatusAggregator simpleStatusAggregator = null;
    StatusAggregator statusAggregator = null;
    AvailabilityStateHealthIndicator availabilityStateHealthIndicator = null;
    SslHealthIndicator sslHealthIndicator = null;
    DiskSpaceHealthIndicator diskSpaceHealthIndicator = null;
    AvailabilityProbesAutoConfiguration availabilityProbesAutoConfiguration = null;
    HealthEndpointAutoConfiguration healthEndpointAutoConfiguration = null;
    HealthEndpointProperties healthEndpointProperties = null;
    HealthProperties healthProperties = null;
    AvailabilityHealthContributorAutoConfiguration availabilityHealthContributorAutoConfiguration = null;
    DiskSpaceHealthContributorAutoConfiguration diskSpaceHealthContributorAutoConfiguration = null;
    DiskSpaceHealthIndicatorProperties diskSpaceHealthIndicatorProperties = null;
    SslHealthContributorAutoConfiguration sslHealthContributorAutoConfiguration = null;
    SslHealthIndicatorProperties sslHealthIndicatorProperties = null;
    CompositeHealthContributorConfiguration compositeHealthContributorConfiguration = null;
    CompositeReactiveHealthContributorConfiguration compositeReactiveHealthContributorConfiguration = null;
    ConditionalOnEnabledHealthIndicator conditionalOnEnabledHealthIndicator = null;
    HealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    AbstractHealthIndicator abstractHealthIndicator = null;
    AbstractReactiveHealthIndicator abstractReactiveHealthIndicator = null;
    CompositeHealthContributor compositeHealthContributor = null;
    CompositeReactiveHealthContributor compositeReactiveHealthContributor = null;
    Health health = null;
    HealthContributor healthContributor = null;
    HealthIndicator healthIndicator = null;
    PingHealthIndicator pingHealthIndicator = null;
    ReactiveHealthContributor reactiveHealthContributor = null;
    ReactiveHealthIndicator reactiveHealthIndicator = null;
    Status status = null;
    DefaultHealthContributorRegistry defaultHealthContributorRegistry = null;
    DefaultReactiveHealthContributorRegistry defaultReactiveHealthContributorRegistry = null;
    HealthContributorRegistry healthContributorRegistry = null;
    ReactiveHealthContributorRegistry reactiveHealthContributorRegistry = null;
}

Migrate Spring Boot Hibernate module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateHibernateModule

Migrate Spring Boot Hibernate module to Spring Boot 4.0.

Recipes applied
  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType ×5)

Example

Before
import org.springframework.boot.actuate.autoconfigure.metrics.orm.jpa.HibernateMetricsAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties;
import org.springframework.boot.autoconfigure.orm.jpa.HibernatePropertiesCustomizer;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateSettings;
import org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy;

class Demo {
    SpringImplicitNamingStrategy implicitNamingStrategy = null;
    HibernateJpaAutoConfiguration autoConfiguration = null;
    HibernateProperties properties = null;
    HibernatePropertiesCustomizer propertiesCustomizer = null;
    HibernateSettings settings = null;
    HibernateMetricsAutoConfiguration metricsAutoConfiguration = null;
}
After
import org.springframework.boot.hibernate.SpringImplicitNamingStrategy;
import org.springframework.boot.hibernate.autoconfigure.HibernateJpaAutoConfiguration;
import org.springframework.boot.hibernate.autoconfigure.HibernateProperties;
import org.springframework.boot.hibernate.autoconfigure.HibernatePropertiesCustomizer;
import org.springframework.boot.hibernate.autoconfigure.HibernateSettings;
import org.springframework.boot.hibernate.autoconfigure.metrics.HibernateMetricsAutoConfiguration;

class Demo {
    SpringImplicitNamingStrategy implicitNamingStrategy = null;
    HibernateJpaAutoConfiguration autoConfiguration = null;
    HibernateProperties properties = null;
    HibernatePropertiesCustomizer propertiesCustomizer = null;
    HibernateSettings settings = null;
    HibernateMetricsAutoConfiguration metricsAutoConfiguration = null;
}

Migrate Spring Boot Integration module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateIntegrationModule

Migrate Spring Boot Integration module to Spring Boot 4.0.

Recipes applied
  • Add Integration Starter Test (io.arconia.rewrite.spring.boot4.AddIntegrationStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType)

Example

Before
import org.springframework.boot.actuate.integration.IntegrationGraphEndpoint;
import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration;

class Demo {
    IntegrationGraphEndpoint integrationGraphEndpoint = null;
    IntegrationAutoConfiguration integrationAutoConfiguration = null;
}
After
import org.springframework.boot.integration.autoconfigure.IntegrationAutoConfiguration;
import org.springframework.boot.integration.actuate.endpoint.IntegrationGraphEndpoint;

class Demo {
    IntegrationGraphEndpoint integrationGraphEndpoint = null;
    IntegrationAutoConfiguration integrationAutoConfiguration = null;
}

Migrate Spring Boot JDBC module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateJdbcModule

Migrate Spring Boot JDBC module to Spring Boot 4.0.

Recipes applied
  • Add JDBC Starter Test (io.arconia.rewrite.spring.boot4.AddJdbcStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×16)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthIndicatorProperties;
import org.springframework.boot.actuate.autoconfigure.metrics.jdbc.DataSourcePoolMetricsAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.metadata.DataSourcePoolMetadataProvidersConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration;
import org.springframework.boot.autoconfigure.jdbc.JdbcClientAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.JdbcConnectionDetails;
import org.springframework.boot.autoconfigure.jdbc.JdbcProperties;
import org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.XADataSourceAutoConfiguration;
import org.springframework.boot.actuate.jdbc.DataSourceHealthIndicator;
import org.springframework.boot.actuate.metrics.jdbc.DataSourcePoolMetrics;
import org.springframework.boot.test.autoconfigure.jdbc.JdbcTest;

class Demo {
    DataSourceHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    DataSourceHealthIndicatorProperties healthIndicatorProperties = null;
    DataSourcePoolMetricsAutoConfiguration poolMetricsAutoConfiguration = null;
    DataSourcePoolMetadataProvidersConfiguration poolMetadataProvidersConfiguration = null;
    DataSourceAutoConfiguration dataSourceAutoConfiguration = null;
    DataSourceProperties dataSourceProperties = null;
    DataSourceTransactionManagerAutoConfiguration transactionManagerAutoConfiguration = null;
    EmbeddedDataSourceConfiguration embeddedDataSourceConfiguration = null;
    JdbcClientAutoConfiguration jdbcClientAutoConfiguration = null;
    JdbcConnectionDetails jdbcConnectionDetails = null;
    JdbcProperties jdbcProperties = null;
    JdbcTemplateAutoConfiguration jdbcTemplateAutoConfiguration = null;
    JndiDataSourceAutoConfiguration jndiDataSourceAutoConfiguration = null;
    XADataSourceAutoConfiguration xaDataSourceAutoConfiguration = null;
    DataSourceHealthIndicator healthIndicator = null;
    DataSourcePoolMetrics poolMetrics = null;
    JdbcTest jdbcTest = null;
}
After
import org.springframework.boot.jdbc.autoconfigure.*;
import org.springframework.boot.jdbc.autoconfigure.health.DataSourceHealthContributorAutoConfiguration;
import org.springframework.boot.jdbc.autoconfigure.health.DataSourceHealthIndicatorProperties;
import org.springframework.boot.jdbc.autoconfigure.metrics.DataSourcePoolMetricsAutoConfiguration;
import org.springframework.boot.jdbc.health.DataSourceHealthIndicator;
import org.springframework.boot.jdbc.metrics.DataSourcePoolMetrics;
import org.springframework.boot.jdbc.test.autoconfigure.JdbcTest;

class Demo {
    DataSourceHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    DataSourceHealthIndicatorProperties healthIndicatorProperties = null;
    DataSourcePoolMetricsAutoConfiguration poolMetricsAutoConfiguration = null;
    DataSourcePoolMetadataProvidersConfiguration poolMetadataProvidersConfiguration = null;
    DataSourceAutoConfiguration dataSourceAutoConfiguration = null;
    DataSourceProperties dataSourceProperties = null;
    DataSourceTransactionManagerAutoConfiguration transactionManagerAutoConfiguration = null;
    EmbeddedDataSourceConfiguration embeddedDataSourceConfiguration = null;
    JdbcClientAutoConfiguration jdbcClientAutoConfiguration = null;
    JdbcConnectionDetails jdbcConnectionDetails = null;
    JdbcProperties jdbcProperties = null;
    JdbcTemplateAutoConfiguration jdbcTemplateAutoConfiguration = null;
    JndiDataSourceAutoConfiguration jndiDataSourceAutoConfiguration = null;
    XADataSourceAutoConfiguration xaDataSourceAutoConfiguration = null;
    DataSourceHealthIndicator healthIndicator = null;
    DataSourcePoolMetrics poolMetrics = null;
    JdbcTest jdbcTest = null;
}

Migrate Spring Boot JMS module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateJmsModule

Migrate Spring Boot JMS module to Spring Boot 4.0.

Recipes applied
  • Add JMS Starter (io.arconia.rewrite.spring.boot4.AddJmsStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add JMS Starter Test (io.arconia.rewrite.spring.boot4.AddJmsStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType)

Example

Before
import org.springframework.boot.actuate.autoconfigure.jms.JmsHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.jms.JmsHealthIndicator;
import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration;

class Demo {
    JmsHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    JmsHealthIndicator healthIndicator = null;
    JmsAutoConfiguration jmsAutoConfiguration = null;
}
After
import org.springframework.boot.jms.autoconfigure.JmsAutoConfiguration;
import org.springframework.boot.jms.autoconfigure.health.JmsHealthContributorAutoConfiguration;
import org.springframework.boot.jms.health.JmsHealthIndicator;

class Demo {
    JmsHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    JmsHealthIndicator healthIndicator = null;
    JmsAutoConfiguration jmsAutoConfiguration = null;
}

Migrate Spring Boot JPA module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateJpaModule

Migrate Spring Boot JPA module to Spring Boot 4.0.

Recipes applied
  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType ×7)

Example

Before
import org.springframework.boot.autoconfigure.orm.jpa.EntityManagerFactoryBuilderCustomizer;
import org.springframework.boot.autoconfigure.orm.jpa.EntityManagerFactoryDependsOnPostProcessor;
import org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties;
import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
import org.springframework.boot.test.autoconfigure.orm.jpa.AutoConfigureTestEntityManager;
import org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManager;
import org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManagerAutoConfiguration;

class Demo {
    EntityManagerFactoryBuilder entityManagerFactoryBuilder = null;
    EntityManagerFactoryBuilderCustomizer entityManagerFactoryBuilderCustomizer = null;
    EntityManagerFactoryDependsOnPostProcessor entityManagerFactoryDependsOnPostProcessor = null;
    JpaBaseConfiguration jpaBaseConfiguration = null;
    JpaProperties jpaProperties = null;
    AutoConfigureTestEntityManager autoConfigureTestEntityManager = null;
    TestEntityManager testEntityManager = null;
    TestEntityManagerAutoConfiguration testEntityManagerAutoConfiguration = null;
}
After
import org.springframework.boot.jpa.EntityManagerFactoryBuilder;
import org.springframework.boot.jpa.autoconfigure.EntityManagerFactoryBuilderCustomizer;
import org.springframework.boot.jpa.autoconfigure.EntityManagerFactoryDependsOnPostProcessor;
import org.springframework.boot.jpa.autoconfigure.JpaBaseConfiguration;
import org.springframework.boot.jpa.autoconfigure.JpaProperties;
import org.springframework.boot.jpa.test.autoconfigure.AutoConfigureTestEntityManager;
import org.springframework.boot.jpa.test.autoconfigure.TestEntityManager;
import org.springframework.boot.jpa.test.autoconfigure.TestEntityManagerAutoConfiguration;

class Demo {
    EntityManagerFactoryBuilder entityManagerFactoryBuilder = null;
    EntityManagerFactoryBuilderCustomizer entityManagerFactoryBuilderCustomizer = null;
    EntityManagerFactoryDependsOnPostProcessor entityManagerFactoryDependsOnPostProcessor = null;
    JpaBaseConfiguration jpaBaseConfiguration = null;
    JpaProperties jpaProperties = null;
    AutoConfigureTestEntityManager autoConfigureTestEntityManager = null;
    TestEntityManager testEntityManager = null;
    TestEntityManagerAutoConfiguration testEntityManagerAutoConfiguration = null;
}

Migrate Spring Boot JSONB module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateJsonbModule

Migrate Spring Boot JSONB module to Spring Boot 4.0.

Recipes applied
  • Add JSONB Starter Test (io.arconia.rewrite.spring.boot4.AddJsonbStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType)

Example

Before
import org.springframework.boot.autoconfigure.jsonb.JsonbAutoConfiguration;

class Demo {
    JsonbAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.jsonb.autoconfigure.JsonbAutoConfiguration;

class Demo {
    JsonbAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot Jackson module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateJacksonModule

Migrate Spring Boot Jackson module to Spring Boot 4.0.

Recipes applied
  • Add Jackson Starter (io.arconia.rewrite.spring.boot4.AddJacksonStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Add Jackson Starter Test (io.arconia.rewrite.spring.boot4.AddJacksonStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×10)

Example

Before
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
import org.springframework.boot.autoconfigure.jackson.JacksonProperties;
import org.springframework.boot.jackson.JsonComponent;
import org.springframework.boot.jackson.JsonComponentModule;
import org.springframework.boot.jackson.JsonMixin;
import org.springframework.boot.jackson.JsonMixinModule;
import org.springframework.boot.jackson.JsonMixinModuleEntries;
import org.springframework.boot.jackson.JsonObjectDeserializer;
import org.springframework.boot.jackson.JsonObjectSerializer;

class Demo {
    Jackson2ObjectMapperBuilderCustomizer customizer = null;
    JacksonAutoConfiguration autoConfiguration = null;
    JacksonProperties properties = null;
    JsonComponent component = null;
    JsonComponentModule componentModule = null;
    JsonMixin mixin = null;
    JsonMixinModule mixinModule = null;
    JsonMixinModuleEntries mixinModuleEntries = null;
    JsonObjectDeserializer objectDeserializer = null;
    JsonObjectSerializer objectSerializer = null;
}
After
import org.springframework.boot.jackson.*;
import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration;
import org.springframework.boot.jackson.autoconfigure.JacksonProperties;
import org.springframework.boot.jackson.autoconfigure.JsonMapperBuilderCustomizer;

class Demo {
    JsonMapperBuilderCustomizer customizer = null;
    JacksonAutoConfiguration autoConfiguration = null;
    JacksonProperties properties = null;
    JacksonComponent component = null;
    JacksonComponentModule componentModule = null;
    JacksonMixin mixin = null;
    JacksonMixinModule mixinModule = null;
    JacksonMixinModuleEntries mixinModuleEntries = null;
    ObjectValueDeserializer objectDeserializer = null;
    ObjectValueSerializer objectSerializer = null;
}

Migrate Spring Boot Jersey module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateJerseyModule

Migrate Spring Boot Jersey module to Spring Boot 4.0.

Recipes applied
  • Add Jersey Starter Test (io.arconia.rewrite.spring.boot4.AddJerseyStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType ×10)

Example

Before
import org.springframework.boot.actuate.autoconfigure.endpoint.web.ServletEndpointManagementContextConfiguration.JerseyServletEndpointManagementContextConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.jersey.JerseyServerMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.web.jersey.JerseyChildManagementContextConfiguration;
import org.springframework.boot.actuate.autoconfigure.web.jersey.JerseySameManagementContextConfiguration;
import org.springframework.boot.actuate.autoconfigure.web.jersey.ManagementContextResourceConfigCustomizer;
import org.springframework.boot.actuate.endpoint.web.jersey.JerseyEndpointResourceFactory;
import org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration;
import org.springframework.boot.autoconfigure.jersey.JerseyProperties;
import org.springframework.boot.autoconfigure.jersey.ResourceConfigCustomizer;
import org.springframework.boot.autoconfigure.web.servlet.DefaultJerseyApplicationPath;
import org.springframework.boot.autoconfigure.web.servlet.JerseyApplicationPath;

class Demo {
    JerseyServletEndpointManagementContextConfiguration servletEndpointManagementContextConfiguration = null;
    JerseyServerMetricsAutoConfiguration serverMetricsAutoConfiguration = null;
    JerseyChildManagementContextConfiguration childManagementContextConfiguration = null;
    JerseySameManagementContextConfiguration sameManagementContextConfiguration = null;
    ManagementContextResourceConfigCustomizer managementContextResourceConfigCustomizer = null;
    JerseyEndpointResourceFactory endpointResourceFactory = null;
    JerseyAutoConfiguration autoConfiguration = null;
    JerseyProperties properties = null;
    ResourceConfigCustomizer resourceConfigCustomizer = null;
    DefaultJerseyApplicationPath defaultApplicationPath = null;
    JerseyApplicationPath applicationPath = null;
}
After
import org.springframework.boot.jersey.actuate.endpoint.web.JerseyEndpointResourceFactory;
import org.springframework.boot.jersey.autoconfigure.*;
import org.springframework.boot.jersey.autoconfigure.actuate.web.JerseyChildManagementContextConfiguration;
import org.springframework.boot.jersey.autoconfigure.actuate.web.JerseyEndpointManagementContextConfiguration;
import org.springframework.boot.jersey.autoconfigure.actuate.web.JerseySameManagementContextConfiguration;
import org.springframework.boot.jersey.autoconfigure.actuate.web.ManagementContextResourceConfigCustomizer;
import org.springframework.boot.jersey.autoconfigure.metrics.JerseyServerMetricsAutoConfiguration;

class Demo {
    JerseyEndpointManagementContextConfiguration servletEndpointManagementContextConfiguration = null;
    JerseyServerMetricsAutoConfiguration serverMetricsAutoConfiguration = null;
    JerseyChildManagementContextConfiguration childManagementContextConfiguration = null;
    JerseySameManagementContextConfiguration sameManagementContextConfiguration = null;
    ManagementContextResourceConfigCustomizer managementContextResourceConfigCustomizer = null;
    JerseyEndpointResourceFactory endpointResourceFactory = null;
    JerseyAutoConfiguration autoConfiguration = null;
    JerseyProperties properties = null;
    ResourceConfigCustomizer resourceConfigCustomizer = null;
    DefaultJerseyApplicationPath defaultApplicationPath = null;
    JerseyApplicationPath applicationPath = null;
}

Migrate Spring Boot Jetty module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateJettyModule

Migrate Spring Boot Jetty module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×8)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType ×2)

Example

Before
import org.springframework.boot.web.embedded.jetty.ConfigurableJettyWebServerFactory;
import org.springframework.boot.web.embedded.jetty.JettyServerCustomizer;
import org.springframework.boot.web.embedded.jetty.JettyWebServer;
import org.springframework.boot.autoconfigure.web.embedded.JettyVirtualThreadsWebServerFactoryCustomizer;
import org.springframework.boot.autoconfigure.web.embedded.JettyWebServerFactoryCustomizer;
import org.springframework.boot.actuate.autoconfigure.metrics.web.jetty.JettyMetricsAutoConfiguration;
import org.springframework.boot.actuate.metrics.web.jetty.JettyConnectionMetricsBinder;
import org.springframework.boot.web.embedded.jetty.JettyReactiveWebServerFactory;
import org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory;

class Demo {
    ConfigurableJettyWebServerFactory configurableJettyWebServerFactory = null;
    JettyServerCustomizer jettyServerCustomizer = null;
    JettyWebServer jettyWebServer = null;
    JettyVirtualThreadsWebServerFactoryCustomizer jettyVirtualThreadsWebServerFactoryCustomizer = null;
    JettyWebServerFactoryCustomizer jettyWebServerFactoryCustomizer = null;
    JettyMetricsAutoConfiguration jettyMetricsAutoConfiguration = null;
    JettyConnectionMetricsBinder jettyConnectionMetricsBinder = null;
    JettyReactiveWebServerFactory jettyReactiveWebServerFactory = null;
    JettyServletWebServerFactory jettyServletWebServerFactory = null;
}
After
import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory;
import org.springframework.boot.jetty.JettyServerCustomizer;
import org.springframework.boot.jetty.JettyWebServer;
import org.springframework.boot.jetty.autoconfigure.JettyVirtualThreadsWebServerFactoryCustomizer;
import org.springframework.boot.jetty.autoconfigure.JettyWebServerFactoryCustomizer;
import org.springframework.boot.jetty.autoconfigure.metrics.JettyMetricsAutoConfiguration;
import org.springframework.boot.jetty.metrics.JettyConnectionMetricsBinder;
import org.springframework.boot.jetty.reactive.JettyReactiveWebServerFactory;
import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory;

class Demo {
    ConfigurableJettyWebServerFactory configurableJettyWebServerFactory = null;
    JettyServerCustomizer jettyServerCustomizer = null;
    JettyWebServer jettyWebServer = null;
    JettyVirtualThreadsWebServerFactoryCustomizer jettyVirtualThreadsWebServerFactoryCustomizer = null;
    JettyWebServerFactoryCustomizer jettyWebServerFactoryCustomizer = null;
    JettyMetricsAutoConfiguration jettyMetricsAutoConfiguration = null;
    JettyConnectionMetricsBinder jettyConnectionMetricsBinder = null;
    JettyReactiveWebServerFactory jettyReactiveWebServerFactory = null;
    JettyServletWebServerFactory jettyServletWebServerFactory = null;
}

Migrate Spring Boot Kafka module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateKafkaModule

Migrate Spring Boot Kafka module to Spring Boot 4.0.

Recipes applied
  • Add Kafka Starter (io.arconia.rewrite.spring.boot4.AddKafkaStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Migrate Kafka Test (io.arconia.rewrite.spring.boot4.MigrateKafkaTest)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Kafka Starter Test (io.arconia.rewrite.spring.boot4.AddKafkaStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType)

Example

Before
import org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.KafkaMetricsAutoConfiguration;

class Demo {
    KafkaAutoConfiguration autoConfiguration = null;
    KafkaMetricsAutoConfiguration metricsAutoConfiguration = null;
}
After
import org.springframework.boot.kafka.autoconfigure.KafkaAutoConfiguration;
import org.springframework.boot.kafka.autoconfigure.metrics.KafkaMetricsAutoConfiguration;

class Demo {
    KafkaAutoConfiguration autoConfiguration = null;
    KafkaMetricsAutoConfiguration metricsAutoConfiguration = null;
}

Migrate Spring Boot Kotlinx module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateKotlinxModule

Migrate Spring Boot Kotlinx module to Spring Boot 4.0.

Recipes applied

Example

Before
plugins {
    id 'java-library'
}

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.springframework.boot:spring-boot-starter-kotlin-serialization"
    testImplementation "org.springframework.boot:spring-boot-starter-kotlin-serialization-test"
}
After
plugins {
    id 'java-library'
}

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.springframework.boot:spring-boot-starter-kotlinx-serialization-json"
    testImplementation "org.springframework.boot:spring-boot-starter-kotlinx-serialization-json-test"
}

Migrate Spring Boot LDAP module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateLdapModule

Migrate Spring Boot LDAP module to Spring Boot 4.0.

Recipes applied
  • Add LDAP Starter Test (io.arconia.rewrite.spring.boot4.AddLdapStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage ×2)

  • Change type (org.openrewrite.java.ChangeType ×2)

Example

Before
import org.springframework.boot.actuate.autoconfigure.ldap.LdapHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.ldap.LdapHealthIndicator;
import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration;
import org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration;

class Demo {
    LdapHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    LdapHealthIndicator healthIndicator = null;
    LdapAutoConfiguration autoConfiguration = null;
    EmbeddedLdapAutoConfiguration embeddedAutoConfiguration = null;
}
After
import org.springframework.boot.ldap.autoconfigure.LdapAutoConfiguration;
import org.springframework.boot.ldap.autoconfigure.embedded.EmbeddedLdapAutoConfiguration;
import org.springframework.boot.ldap.autoconfigure.health.LdapHealthContributorAutoConfiguration;
import org.springframework.boot.ldap.health.LdapHealthIndicator;

class Demo {
    LdapHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    LdapHealthIndicator healthIndicator = null;
    LdapAutoConfiguration autoConfiguration = null;
    EmbeddedLdapAutoConfiguration embeddedAutoConfiguration = null;
}

Migrate Spring Boot Liquibase module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateLiquibaseModule

Migrate Spring Boot Liquibase module to Spring Boot 4.0.

Recipes applied
  • Add Liquibase Starter (io.arconia.rewrite.spring.boot4.AddLiquibaseStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Liquibase Starter Test (io.arconia.rewrite.spring.boot4.AddLiquibaseStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×2)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.actuate.autoconfigure.liquibase.LiquibaseEndpointAutoConfiguration;
import org.springframework.boot.actuate.liquibase.LiquibaseEndpoint;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;

class Demo {
    LiquibaseEndpointAutoConfiguration endpointAutoConfiguration = null;
    LiquibaseEndpoint endpoint = null;
    LiquibaseProperties properties = null;
}
After
import org.springframework.boot.liquibase.autoconfigure.LiquibaseProperties;
import org.springframework.boot.liquibase.actuate.endpoint.LiquibaseEndpoint;
import org.springframework.boot.liquibase.autoconfigure.LiquibaseEndpointAutoConfiguration;

class Demo {
    LiquibaseEndpointAutoConfiguration endpointAutoConfiguration = null;
    LiquibaseEndpoint endpoint = null;
    LiquibaseProperties properties = null;
}

Migrate Spring Boot Mail module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateMailModule

Migrate Spring Boot Mail module to Spring Boot 4.0.

Recipes applied
  • Add Mail Starter Test (io.arconia.rewrite.spring.boot4.AddMailStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType)

Example

Before
import org.springframework.boot.actuate.autoconfigure.mail.MailHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.mail.MailHealthIndicator;
import org.springframework.boot.autoconfigure.mail.MailSenderAutoConfiguration;

class Demo {
    MailHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    MailHealthIndicator healthIndicator = null;
    MailSenderAutoConfiguration mailSenderAutoConfiguration = null;
}
After
import org.springframework.boot.mail.autoconfigure.MailSenderAutoConfiguration;
import org.springframework.boot.mail.health.MailHealthIndicator;
import org.springframework.boot.mail.autoconfigure.MailHealthContributorAutoConfiguration;

class Demo {
    MailHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    MailHealthIndicator healthIndicator = null;
    MailSenderAutoConfiguration mailSenderAutoConfiguration = null;
}

Migrate Spring Boot Micrometer Metrics module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateMicrometerMetricsModule

Migrate Spring Boot Micrometer Metrics module to Spring Boot 4.0.

Recipes applied
  • Add Micrometer Metrics Starter Test (io.arconia.rewrite.spring.boot4.AddMicrometerMetricsStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×13)

  • Rename package name (org.openrewrite.java.ChangePackage ×19)

  • Change type (org.openrewrite.java.ChangeType ×6)

Example

Before
import org.springframework.boot.actuate.autoconfigure.metrics.CompositeMeterRegistryAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.JvmMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.Log4J2MetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.LogbackMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
import org.springframework.boot.actuate.autoconfigure.metrics.MeterValue;
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAspectsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties;
import org.springframework.boot.actuate.autoconfigure.metrics.PropertiesMeterFilter;
import org.springframework.boot.actuate.autoconfigure.metrics.ServiceLevelObjectiveBoundary;
import org.springframework.boot.actuate.autoconfigure.metrics.SystemMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
import org.springframework.boot.actuate.autoconfigure.metrics.export.appoptics.AppOpticsMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.atlas.AtlasMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.datadog.DatadogMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.dynatrace.DynatraceMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.elastic.ElasticMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.ganglia.GangliaMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.graphite.GraphiteMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.humio.HumioMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.influx.InfluxMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.jmx.JmxMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.kairos.KairosMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.newrelic.NewRelicMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.otlp.OtlpMetricsConnectionDetails;
import org.springframework.boot.actuate.autoconfigure.metrics.export.prometheus.PrometheusMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.PropertiesConfigAdapter;
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.stackdriver.StackdriverMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.statsd.StatsdMetricsExportAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.startup.StartupTimeMetricsListenerAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.task.TaskExecutorMetricsAutoConfiguration;
import org.springframework.boot.actuate.metrics.MetricsEndpoint;
import org.springframework.boot.actuate.metrics.export.prometheus.PrometheusPushGatewayManager;
import org.springframework.boot.actuate.metrics.startup.StartupTimeMetricsListener;
import org.springframework.boot.actuate.metrics.system.DiskSpaceMetricsBinder;

class Demo {
    MetricsEndpoint metricsEndpoint = null;
    PrometheusPushGatewayManager prometheusPushGatewayManager = null;
    StartupTimeMetricsListener startupTimeMetricsListener = null;
    DiskSpaceMetricsBinder diskSpaceMetricsBinder = null;
    CompositeMeterRegistryAutoConfiguration compositeMeterRegistryAutoConfiguration = null;
    MeterRegistryCustomizer meterRegistryCustomizer = null;
    MeterValue meterValue = null;
    MetricsAspectsAutoConfiguration metricsAspectsAutoConfiguration = null;
    MetricsAutoConfiguration metricsAutoConfiguration = null;
    MetricsEndpointAutoConfiguration metricsEndpointAutoConfiguration = null;
    MetricsProperties metricsProperties = null;
    PropertiesMeterFilter propertiesMeterFilter = null;
    ServiceLevelObjectiveBoundary serviceLevelObjectiveBoundary = null;
    JvmMetricsAutoConfiguration jvmMetricsAutoConfiguration = null;
    Log4J2MetricsAutoConfiguration log4J2MetricsAutoConfiguration = null;
    LogbackMetricsAutoConfiguration logbackMetricsAutoConfiguration = null;
    StartupTimeMetricsListenerAutoConfiguration startupTimeMetricsListenerAutoConfiguration = null;
    SystemMetricsAutoConfiguration systemMetricsAutoConfiguration = null;
    TaskExecutorMetricsAutoConfiguration taskExecutorMetricsAutoConfiguration = null;
    ConditionalOnEnabledMetricsExport conditionalOnEnabledMetricsExport = null;
    AppOpticsMetricsExportAutoConfiguration appOpticsMetricsExportAutoConfiguration = null;
    AtlasMetricsExportAutoConfiguration atlasMetricsExportAutoConfiguration = null;
    DatadogMetricsExportAutoConfiguration datadogMetricsExportAutoConfiguration = null;
    DynatraceMetricsExportAutoConfiguration dynatraceMetricsExportAutoConfiguration = null;
    ElasticMetricsExportAutoConfiguration elasticMetricsExportAutoConfiguration = null;
    GangliaMetricsExportAutoConfiguration gangliaMetricsExportAutoConfiguration = null;
    GraphiteMetricsExportAutoConfiguration graphiteMetricsExportAutoConfiguration = null;
    HumioMetricsExportAutoConfiguration humioMetricsExportAutoConfiguration = null;
    InfluxMetricsExportAutoConfiguration influxMetricsExportAutoConfiguration = null;
    JmxMetricsExportAutoConfiguration jmxMetricsExportAutoConfiguration = null;
    KairosMetricsExportAutoConfiguration kairosMetricsExportAutoConfiguration = null;
    NewRelicMetricsExportAutoConfiguration newRelicMetricsExportAutoConfiguration = null;
    OtlpMetricsConnectionDetails otlpMetricsConnectionDetails = null;
    PrometheusMetricsExportAutoConfiguration prometheusMetricsExportAutoConfiguration = null;
    PropertiesConfigAdapter propertiesConfigAdapter = null;
    SimpleMetricsExportAutoConfiguration simpleMetricsExportAutoConfiguration = null;
    StackdriverMetricsExportAutoConfiguration stackdriverMetricsExportAutoConfiguration = null;
    StatsdMetricsExportAutoConfiguration statsdMetricsExportAutoConfiguration = null;
}
After
import org.springframework.boot.micrometer.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.appoptics.AppOpticsMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.atlas.AtlasMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.datadog.DatadogMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.dynatrace.DynatraceMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.elastic.ElasticMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.ganglia.GangliaMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.graphite.GraphiteMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.humio.HumioMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.influx.InfluxMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.jmx.JmxMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.kairos.KairosMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.newrelic.NewRelicMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.otlp.OtlpMetricsConnectionDetails;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.prometheus.PrometheusMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.properties.PropertiesConfigAdapter;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.stackdriver.StackdriverMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.export.statsd.StatsdMetricsExportAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.jvm.JvmMetricsAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.logging.log4j2.Log4J2MetricsAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.logging.logback.LogbackMetricsAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.startup.StartupTimeMetricsListenerAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.system.SystemMetricsAutoConfiguration;
import org.springframework.boot.micrometer.metrics.autoconfigure.task.TaskExecutorMetricsAutoConfiguration;
import org.springframework.boot.micrometer.metrics.actuate.endpoint.MetricsEndpoint;
import org.springframework.boot.micrometer.metrics.autoconfigure.*;
import org.springframework.boot.micrometer.metrics.export.prometheus.PrometheusPushGatewayManager;
import org.springframework.boot.micrometer.metrics.startup.StartupTimeMetricsListener;
import org.springframework.boot.micrometer.metrics.system.DiskSpaceMetricsBinder;

class Demo {
    MetricsEndpoint metricsEndpoint = null;
    PrometheusPushGatewayManager prometheusPushGatewayManager = null;
    StartupTimeMetricsListener startupTimeMetricsListener = null;
    DiskSpaceMetricsBinder diskSpaceMetricsBinder = null;
    CompositeMeterRegistryAutoConfiguration compositeMeterRegistryAutoConfiguration = null;
    MeterRegistryCustomizer meterRegistryCustomizer = null;
    MeterValue meterValue = null;
    MetricsAspectsAutoConfiguration metricsAspectsAutoConfiguration = null;
    MetricsAutoConfiguration metricsAutoConfiguration = null;
    MetricsEndpointAutoConfiguration metricsEndpointAutoConfiguration = null;
    MetricsProperties metricsProperties = null;
    PropertiesMeterFilter propertiesMeterFilter = null;
    ServiceLevelObjectiveBoundary serviceLevelObjectiveBoundary = null;
    JvmMetricsAutoConfiguration jvmMetricsAutoConfiguration = null;
    Log4J2MetricsAutoConfiguration log4J2MetricsAutoConfiguration = null;
    LogbackMetricsAutoConfiguration logbackMetricsAutoConfiguration = null;
    StartupTimeMetricsListenerAutoConfiguration startupTimeMetricsListenerAutoConfiguration = null;
    SystemMetricsAutoConfiguration systemMetricsAutoConfiguration = null;
    TaskExecutorMetricsAutoConfiguration taskExecutorMetricsAutoConfiguration = null;
    ConditionalOnEnabledMetricsExport conditionalOnEnabledMetricsExport = null;
    AppOpticsMetricsExportAutoConfiguration appOpticsMetricsExportAutoConfiguration = null;
    AtlasMetricsExportAutoConfiguration atlasMetricsExportAutoConfiguration = null;
    DatadogMetricsExportAutoConfiguration datadogMetricsExportAutoConfiguration = null;
    DynatraceMetricsExportAutoConfiguration dynatraceMetricsExportAutoConfiguration = null;
    ElasticMetricsExportAutoConfiguration elasticMetricsExportAutoConfiguration = null;
    GangliaMetricsExportAutoConfiguration gangliaMetricsExportAutoConfiguration = null;
    GraphiteMetricsExportAutoConfiguration graphiteMetricsExportAutoConfiguration = null;
    HumioMetricsExportAutoConfiguration humioMetricsExportAutoConfiguration = null;
    InfluxMetricsExportAutoConfiguration influxMetricsExportAutoConfiguration = null;
    JmxMetricsExportAutoConfiguration jmxMetricsExportAutoConfiguration = null;
    KairosMetricsExportAutoConfiguration kairosMetricsExportAutoConfiguration = null;
    NewRelicMetricsExportAutoConfiguration newRelicMetricsExportAutoConfiguration = null;
    OtlpMetricsConnectionDetails otlpMetricsConnectionDetails = null;
    PrometheusMetricsExportAutoConfiguration prometheusMetricsExportAutoConfiguration = null;
    PropertiesConfigAdapter propertiesConfigAdapter = null;
    SimpleMetricsExportAutoConfiguration simpleMetricsExportAutoConfiguration = null;
    StackdriverMetricsExportAutoConfiguration stackdriverMetricsExportAutoConfiguration = null;
    StatsdMetricsExportAutoConfiguration statsdMetricsExportAutoConfiguration = null;
}

Migrate Spring Boot Micrometer Observation module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateMicrometerObservationModule

Migrate Spring Boot Micrometer Observation module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×3)

Example

Before
import org.springframework.boot.actuate.autoconfigure.observation.ObservationAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.observation.ObservationProperties;
import org.springframework.boot.actuate.autoconfigure.observation.ObservationRegistryCustomizer;

class Demo {
    ObservationAutoConfiguration autoConfiguration = null;
    ObservationProperties properties = null;
    ObservationRegistryCustomizer registryCustomizer = null;
}
After
import org.springframework.boot.micrometer.observation.autoconfigure.ObservationAutoConfiguration;
import org.springframework.boot.micrometer.observation.autoconfigure.ObservationProperties;
import org.springframework.boot.micrometer.observation.autoconfigure.ObservationRegistryCustomizer;

class Demo {
    ObservationAutoConfiguration autoConfiguration = null;
    ObservationProperties properties = null;
    ObservationRegistryCustomizer registryCustomizer = null;
}

Migrate Spring Boot Micrometer Tracing Brave module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateMicrometerTracingBraveModule

Migrate Spring Boot Micrometer Tracing Brave module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType)

Example

Before
import org.springframework.boot.actuate.autoconfigure.tracing.BraveAutoConfiguration;

class Demo {
    BraveAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.micrometer.tracing.brave.autoconfigure.BraveAutoConfiguration;

class Demo {
    BraveAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot Micrometer Tracing OpenTelemetry module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateMicrometerTracingOpenTelemetryModule

Migrate Spring Boot Micrometer Tracing OpenTelemetry module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×12)

Example

Before
import org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryEventPublisherBeansApplicationListener;
import org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryEventPublisherBeansTestExecutionListener;
import org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryTracingAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.tracing.SdkTracerProviderBuilderCustomizer;
import org.springframework.boot.actuate.autoconfigure.tracing.SpanExporters;
import org.springframework.boot.actuate.autoconfigure.tracing.SpanProcessors;
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpGrpcSpanExporterBuilderCustomizer;
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpHttpSpanExporterBuilderCustomizer;
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingConnectionDetails;
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingProperties;
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.Transport;

class Demo {
    OpenTelemetryEventPublisherBeansApplicationListener applicationListener = null;
    OpenTelemetryEventPublisherBeansTestExecutionListener testExecutionListener = null;
    OpenTelemetryTracingAutoConfiguration tracingAutoConfiguration = null;
    SdkTracerProviderBuilderCustomizer sdkTracerProviderBuilderCustomizer = null;
    SpanExporters spanExporters = null;
    SpanProcessors spanProcessors = null;
    OtlpGrpcSpanExporterBuilderCustomizer otlpGrpcSpanExporterBuilderCustomizer = null;
    OtlpHttpSpanExporterBuilderCustomizer otlpHttpSpanExporterBuilderCustomizer = null;
    OtlpTracingAutoConfiguration otlpTracingAutoConfiguration = null;
    OtlpTracingConnectionDetails otlpTracingConnectionDetails = null;
    OtlpTracingProperties otlpTracingProperties = null;
    Transport transport = null;
}
After
import org.springframework.boot.micrometer.tracing.opentelemetry.autoconfigure.*;
import org.springframework.boot.micrometer.tracing.opentelemetry.autoconfigure.otlp.*;

class Demo {
    OpenTelemetryEventPublisherBeansApplicationListener applicationListener = null;
    OpenTelemetryEventPublisherBeansTestExecutionListener testExecutionListener = null;
    OpenTelemetryTracingAutoConfiguration tracingAutoConfiguration = null;
    SdkTracerProviderBuilderCustomizer sdkTracerProviderBuilderCustomizer = null;
    SpanExporters spanExporters = null;
    SpanProcessors spanProcessors = null;
    OtlpGrpcSpanExporterBuilderCustomizer otlpGrpcSpanExporterBuilderCustomizer = null;
    OtlpHttpSpanExporterBuilderCustomizer otlpHttpSpanExporterBuilderCustomizer = null;
    OtlpTracingAutoConfiguration otlpTracingAutoConfiguration = null;
    OtlpTracingConnectionDetails otlpTracingConnectionDetails = null;
    OtlpTracingProperties otlpTracingProperties = null;
    Transport transport = null;
}

Migrate Spring Boot Micrometer Tracing module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateMicrometerTracingModule

Migrate Spring Boot Micrometer Tracing module to Spring Boot 4.0.

Recipes applied
  • Add Micrometer Tracing Starter Test (io.arconia.rewrite.spring.boot4.AddMicrometerTracingStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×10)

Example

Before
import org.springframework.boot.actuate.autoconfigure.tracing.ConditionalOnEnabledTracing;
import org.springframework.boot.actuate.autoconfigure.tracing.MicrometerTracingAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.tracing.NoopTracerAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.tracing.TracingProperties;
import org.springframework.boot.actuate.autoconfigure.tracing.prometheus.PrometheusExemplarsAutoConfiguration;

class Demo {
    ConditionalOnEnabledTracing conditionalOnEnabledTracing = null;
    MicrometerTracingAutoConfiguration micrometerTracingAutoConfiguration = null;
    NoopTracerAutoConfiguration noopTracerAutoConfiguration = null;
    TracingProperties tracingProperties = null;
    TracingProperties.Sampling sampling = null;
    TracingProperties.Baggage baggage = null;
    TracingProperties.Baggage.Correlation correlation = null;
    TracingProperties.Propagation propagation = null;
    TracingProperties.Propagation.PropagationType propagationType = null;
    PrometheusExemplarsAutoConfiguration prometheusExemplarsAutoConfiguration = null;
}
After
import org.springframework.boot.micrometer.tracing.autoconfigure.ConditionalOnEnabledTracingExport;
import org.springframework.boot.micrometer.tracing.autoconfigure.MicrometerTracingAutoConfiguration;
import org.springframework.boot.micrometer.tracing.autoconfigure.NoopTracerAutoConfiguration;
import org.springframework.boot.micrometer.tracing.autoconfigure.TracingProperties;
import org.springframework.boot.micrometer.tracing.autoconfigure.prometheus.PrometheusExemplarsAutoConfiguration;

class Demo {
    ConditionalOnEnabledTracingExport conditionalOnEnabledTracing = null;
    MicrometerTracingAutoConfiguration micrometerTracingAutoConfiguration = null;
    NoopTracerAutoConfiguration noopTracerAutoConfiguration = null;
    TracingProperties tracingProperties = null;
    TracingProperties.Sampling sampling = null;
    TracingProperties.Baggage baggage = null;
    TracingProperties.Baggage.Correlation correlation = null;
    TracingProperties.Propagation propagation = null;
    TracingProperties.Propagation.PropagationType propagationType = null;
    PrometheusExemplarsAutoConfiguration prometheusExemplarsAutoConfiguration = null;
}

Migrate Spring Boot MongoDB module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateMongoDbModule

Migrate Spring Boot MongoDB module to Spring Boot 4.0.

Recipes applied
  • Add MongoDB Starter Test (io.arconia.rewrite.spring.boot4.AddMongoDbStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage ×2)

  • Change type (org.openrewrite.java.ChangeType)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.actuate.autoconfigure.data.mongo.MongoHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.mongo.MongoMetricsAutoConfiguration;
import org.springframework.boot.actuate.data.mongo.MongoHealthIndicator;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;

class Demo {
    MongoAutoConfiguration autoConfiguration = null;
    MongoHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    MongoMetricsAutoConfiguration metricsAutoConfiguration = null;
    MongoHealthIndicator healthIndicator = null;
}
After
import org.springframework.boot.mongodb.autoconfigure.health.MongoHealthContributorAutoConfiguration;
import org.springframework.boot.mongodb.autoconfigure.metrics.MongoMetricsAutoConfiguration;
import org.springframework.boot.mongodb.health.MongoHealthIndicator;
import org.springframework.boot.mongodb.autoconfigure.MongoAutoConfiguration;

class Demo {
    MongoAutoConfiguration autoConfiguration = null;
    MongoHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    MongoMetricsAutoConfiguration metricsAutoConfiguration = null;
    MongoHealthIndicator healthIndicator = null;
}

Migrate Spring Boot Mustache module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateMustacheModule

Migrate Spring Boot Mustache module to Spring Boot 4.0.

Recipes applied
  • Add Mustache Starter Test (io.arconia.rewrite.spring.boot4.AddMustacheStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType ×4)

Example

Before
import org.springframework.boot.autoconfigure.mustache.MustacheProperties;

class Demo {
    MustacheProperties mustacheProperties = null;
    org.springframework.boot.web.reactive.result.view.MustacheView reactiveView = null;
    org.springframework.boot.web.reactive.result.view.MustacheViewResolver reactiveViewResolver = null;
    org.springframework.boot.web.servlet.view.MustacheView servletView = null;
    org.springframework.boot.web.servlet.view.MustacheViewResolver servletViewResolver = null;
}
After
import org.springframework.boot.mustache.autoconfigure.MustacheProperties;
import org.springframework.boot.mustache.reactive.view.MustacheView;
import org.springframework.boot.mustache.reactive.view.MustacheViewResolver;

class Demo {
    MustacheProperties mustacheProperties = null;
    MustacheView reactiveView = null;
    MustacheViewResolver reactiveViewResolver = null;
    org.springframework.boot.mustache.servlet.view.MustacheView servletView = null;
    org.springframework.boot.mustache.servlet.view.MustacheViewResolver servletViewResolver = null;
}

Migrate Spring Boot Neo4j module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateNeo4jModule

Migrate Spring Boot Neo4j module to Spring Boot 4.0.

Recipes applied
  • Add Neo4j Starter Test (io.arconia.rewrite.spring.boot4.AddNeo4jStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.autoconfigure.neo4j.Neo4jAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.neo4j.Neo4jHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.neo4j.Neo4jHealthIndicator;

class Demo {
    Neo4jAutoConfiguration autoConfiguration = null;
    Neo4jHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    Neo4jHealthIndicator healthIndicator = null;
}
After
import org.springframework.boot.neo4j.autoconfigure.Neo4jAutoConfiguration;
import org.springframework.boot.neo4j.autoconfigure.health.Neo4jHealthContributorAutoConfiguration;
import org.springframework.boot.neo4j.health.Neo4jHealthIndicator;

class Demo {
    Neo4jAutoConfiguration autoConfiguration = null;
    Neo4jHealthContributorAutoConfiguration healthContributorAutoConfiguration = null;
    Neo4jHealthIndicator healthIndicator = null;
}

Migrate Spring Boot Netty module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateNettyModule

Migrate Spring Boot Netty module to Spring Boot 4.0.

Recipes applied
  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.autoconfigure.netty.NettyProperties;

class Demo {
    NettyProperties nettyProperties = null;
}
After
import org.springframework.boot.netty.autoconfigure.NettyProperties;

class Demo {
    NettyProperties nettyProperties = null;
}

Migrate Spring Boot OpenTelemetry module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateOpenTelemetryModule

Migrate Spring Boot OpenTelemetry module to Spring Boot 4.0.

Recipes applied
  • Add OpenTelemetry Starter for Metrics (io.arconia.rewrite.spring.boot4.AddOpenTelemetryStarterForMetrics)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Add OpenTelemetry Starter for Tracing (io.arconia.rewrite.spring.boot4.AddOpenTelemetryStarterForTracing)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Add OpenTelemetry Starter Test (io.arconia.rewrite.spring.boot4.AddOpenTelemetryStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

    • Remove a Gradle or Maven dependency (org.openrewrite.java.dependencies.RemoveDependency ×5)

  • Change type (org.openrewrite.java.ChangeType ×6)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.actuate.autoconfigure.opentelemetry.OpenTelemetryAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.opentelemetry.OpenTelemetryResourceAttributes;
import org.springframework.boot.actuate.autoconfigure.opentelemetry.OpenTelemetryProperties;
import org.springframework.boot.actuate.autoconfigure.logging.ConditionalOnEnabledLoggingExport;
import org.springframework.boot.actuate.autoconfigure.logging.OpenTelemetryLoggingAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.logging.SdkLoggerProviderBuilderCustomizer;
import org.springframework.boot.actuate.autoconfigure.logging.otlp.OtlpLoggingAutoConfiguration;

class Demo {
    OpenTelemetryAutoConfiguration autoConfiguration = null;
    OpenTelemetryResourceAttributes resourceAttributes = null;
    OpenTelemetryProperties properties = null;
    ConditionalOnEnabledLoggingExport conditionalOnEnabledLoggingExport = null;
    OpenTelemetryLoggingAutoConfiguration loggingAutoConfiguration = null;
    SdkLoggerProviderBuilderCustomizer loggerProviderBuilderCustomizer = null;
    OtlpLoggingAutoConfiguration otlpLoggingAutoConfiguration = null;
}
After
import org.springframework.boot.opentelemetry.autoconfigure.OpenTelemetryProperties;
import org.springframework.boot.opentelemetry.autoconfigure.OpenTelemetryResourceAttributes;
import org.springframework.boot.opentelemetry.autoconfigure.OpenTelemetrySdkAutoConfiguration;
import org.springframework.boot.opentelemetry.autoconfigure.logging.ConditionalOnEnabledLoggingExport;
import org.springframework.boot.opentelemetry.autoconfigure.logging.OpenTelemetryLoggingAutoConfiguration;
import org.springframework.boot.opentelemetry.autoconfigure.logging.SdkLoggerProviderBuilderCustomizer;
import org.springframework.boot.opentelemetry.autoconfigure.logging.otlp.OtlpLoggingAutoConfiguration;

class Demo {
    OpenTelemetrySdkAutoConfiguration autoConfiguration = null;
    OpenTelemetryResourceAttributes resourceAttributes = null;
    OpenTelemetryProperties properties = null;
    ConditionalOnEnabledLoggingExport conditionalOnEnabledLoggingExport = null;
    OpenTelemetryLoggingAutoConfiguration loggingAutoConfiguration = null;
    SdkLoggerProviderBuilderCustomizer loggerProviderBuilderCustomizer = null;
    OtlpLoggingAutoConfiguration otlpLoggingAutoConfiguration = null;
}

Migrate Spring Boot Persistence module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigratePersistenceModule

Migrate Spring Boot Persistence module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×4)

Example

Before
import org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.domain.EntityScanPackages;
import org.springframework.boot.autoconfigure.domain.EntityScanner;

class Demo {
    PersistenceExceptionTranslationAutoConfiguration autoConfiguration = null;
    EntityScan entityScan = null;
    EntityScanPackages entityScanPackages = null;
    EntityScanner entityScanner = null;
}
After
import org.springframework.boot.persistence.autoconfigure.EntityScan;
import org.springframework.boot.persistence.autoconfigure.EntityScanPackages;
import org.springframework.boot.persistence.autoconfigure.EntityScanner;
import org.springframework.boot.persistence.autoconfigure.PersistenceExceptionTranslationAutoConfiguration;

class Demo {
    PersistenceExceptionTranslationAutoConfiguration autoConfiguration = null;
    EntityScan entityScan = null;
    EntityScanPackages entityScanPackages = null;
    EntityScanner entityScanner = null;
}

Migrate Spring Boot Pulsar module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigratePulsarModule

Migrate Spring Boot Pulsar module to Spring Boot 4.0.

Recipes applied
  • Add Pulsar Starter Test (io.arconia.rewrite.spring.boot4.AddPulsarStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×4)

Example

Before
import org.springframework.boot.autoconfigure.pulsar.PulsarAutoConfiguration;
import org.springframework.boot.autoconfigure.pulsar.PulsarConnectionDetails;
import org.springframework.boot.autoconfigure.pulsar.PulsarContainerFactoryCustomizer;
import org.springframework.boot.autoconfigure.pulsar.PulsarProperties;

class Demo {
    PulsarAutoConfiguration autoConfiguration = null;
    PulsarConnectionDetails connectionDetails = null;
    PulsarContainerFactoryCustomizer containerFactoryCustomizer = null;
    PulsarProperties properties = null;
}
After
import org.springframework.boot.pulsar.autoconfigure.PulsarAutoConfiguration;
import org.springframework.boot.pulsar.autoconfigure.PulsarConnectionDetails;
import org.springframework.boot.pulsar.autoconfigure.PulsarContainerFactoryCustomizer;
import org.springframework.boot.pulsar.autoconfigure.PulsarProperties;

class Demo {
    PulsarAutoConfiguration autoConfiguration = null;
    PulsarConnectionDetails connectionDetails = null;
    PulsarContainerFactoryCustomizer containerFactoryCustomizer = null;
    PulsarProperties properties = null;
}

Migrate Spring Boot Quartz module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateQuartzModule

Migrate Spring Boot Quartz module to Spring Boot 4.0.

Recipes applied
  • Add Quartz Starter Test (io.arconia.rewrite.spring.boot4.AddQuartzStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×4)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.actuate.autoconfigure.quartz.QuartzEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.quartz.QuartzEndpointProperties;
import org.springframework.boot.actuate.quartz.QuartzEndpoint;
import org.springframework.boot.actuate.quartz.QuartzEndpointWebExtension;
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;

class Demo {
    QuartzEndpointAutoConfiguration endpointAutoConfiguration = null;
    QuartzEndpointProperties endpointProperties = null;
    QuartzEndpoint endpoint = null;
    QuartzEndpointWebExtension endpointWebExtension = null;
    QuartzAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.quartz.autoconfigure.QuartzAutoConfiguration;
import org.springframework.boot.quartz.actuate.endpoint.QuartzEndpoint;
import org.springframework.boot.quartz.actuate.endpoint.QuartzEndpointWebExtension;
import org.springframework.boot.quartz.autoconfigure.QuartzEndpointAutoConfiguration;
import org.springframework.boot.quartz.autoconfigure.QuartzEndpointProperties;

class Demo {
    QuartzEndpointAutoConfiguration endpointAutoConfiguration = null;
    QuartzEndpointProperties endpointProperties = null;
    QuartzEndpoint endpoint = null;
    QuartzEndpointWebExtension endpointWebExtension = null;
    QuartzAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot R2DBC module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateR2dbcModule

Migrate Spring Boot R2DBC module to Spring Boot 4.0.

Recipes applied
  • Add R2DBC Starter Test (io.arconia.rewrite.spring.boot4.AddR2dbcStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×6)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.actuate.autoconfigure.metrics.r2dbc.ConnectionPoolMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.r2dbc.ConnectionFactoryHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.r2dbc.R2dbcObservationAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.r2dbc.R2dbcObservationProperties;
import org.springframework.boot.actuate.metrics.r2dbc.ConnectionPoolMetrics;
import org.springframework.boot.actuate.r2dbc.ConnectionFactoryHealthIndicator;
import org.springframework.boot.autoconfigure.r2dbc.R2dbcAutoConfiguration;

class Demo {
    ConnectionPoolMetricsAutoConfiguration connectionPoolMetricsAutoConfiguration = null;
    ConnectionFactoryHealthContributorAutoConfiguration connectionFactoryHealthContributorAutoConfiguration = null;
    R2dbcObservationAutoConfiguration r2dbcObservationAutoConfiguration = null;
    R2dbcObservationProperties r2dbcObservationProperties = null;
    ConnectionPoolMetrics connectionPoolMetrics = null;
    ConnectionFactoryHealthIndicator connectionFactoryHealthIndicator = null;
    R2dbcAutoConfiguration r2dbcAutoConfiguration = null;
}
After
import org.springframework.boot.r2dbc.autoconfigure.R2dbcAutoConfiguration;
import org.springframework.boot.r2dbc.autoconfigure.health.ConnectionFactoryHealthContributorAutoConfiguration;
import org.springframework.boot.r2dbc.autoconfigure.metrics.ConnectionPoolMetricsAutoConfiguration;
import org.springframework.boot.r2dbc.autoconfigure.observation.R2dbcObservationAutoConfiguration;
import org.springframework.boot.r2dbc.autoconfigure.observation.R2dbcObservationProperties;
import org.springframework.boot.r2dbc.health.ConnectionFactoryHealthIndicator;
import org.springframework.boot.r2dbc.metrics.ConnectionPoolMetrics;

class Demo {
    ConnectionPoolMetricsAutoConfiguration connectionPoolMetricsAutoConfiguration = null;
    ConnectionFactoryHealthContributorAutoConfiguration connectionFactoryHealthContributorAutoConfiguration = null;
    R2dbcObservationAutoConfiguration r2dbcObservationAutoConfiguration = null;
    R2dbcObservationProperties r2dbcObservationProperties = null;
    ConnectionPoolMetrics connectionPoolMetrics = null;
    ConnectionFactoryHealthIndicator connectionFactoryHealthIndicator = null;
    R2dbcAutoConfiguration r2dbcAutoConfiguration = null;
}

Migrate Spring Boot REST Docs module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateRestDocsModule

Migrate Spring Boot REST Docs module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×7)

Example

Before
import org.springframework.boot.test.autoconfigure.restdocs.AutoConfigureRestDocs;
import org.springframework.boot.test.autoconfigure.restdocs.RestDocsAutoConfiguration;
import org.springframework.boot.test.autoconfigure.restdocs.RestDocsMockMvcBuilderCustomizer;
import org.springframework.boot.test.autoconfigure.restdocs.RestDocsMockMvcConfigurationCustomizer;
import org.springframework.boot.test.autoconfigure.restdocs.RestDocsProperties;
import org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener;
import org.springframework.boot.test.autoconfigure.restdocs.RestDocsWebTestClientConfigurationCustomizer;

class Demo {
    AutoConfigureRestDocs autoConfigureRestDocs = null;
    RestDocsAutoConfiguration restDocsAutoConfiguration = null;
    RestDocsMockMvcBuilderCustomizer restDocsMockMvcBuilderCustomizer = null;
    RestDocsMockMvcConfigurationCustomizer restDocsMockMvcConfigurationCustomizer = null;
    RestDocsProperties restDocsProperties = null;
    RestDocsTestExecutionListener restDocsTestExecutionListener = null;
    RestDocsWebTestClientConfigurationCustomizer restDocsWebTestClientConfigurationCustomizer = null;
}
After
import org.springframework.boot.restdocs.test.autoconfigure.*;

class Demo {
    AutoConfigureRestDocs autoConfigureRestDocs = null;
    RestDocsAutoConfiguration restDocsAutoConfiguration = null;
    RestDocsMockMvcBuilderCustomizer restDocsMockMvcBuilderCustomizer = null;
    RestDocsMockMvcConfigurationCustomizer restDocsMockMvcConfigurationCustomizer = null;
    RestDocsProperties restDocsProperties = null;
    RestDocsTestExecutionListener restDocsTestExecutionListener = null;
    RestDocsWebTestClientConfigurationCustomizer restDocsWebTestClientConfigurationCustomizer = null;
}

Migrate Spring Boot RSocket module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateRsocketModule

Migrate Spring Boot RSocket module to Spring Boot 4.0.

Recipes applied
  • Add RSocket Starter Test (io.arconia.rewrite.spring.boot4.AddRsocketStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.autoconfigure.rsocket.RSocketServerAutoConfiguration;

class Demo {
    RSocketServerAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.rsocket.autoconfigure.RSocketServerAutoConfiguration;

class Demo {
    RSocketServerAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot Reactor Netty module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateReactorNettyModule

Migrate Spring Boot Reactor Netty module to Spring Boot 4.0.

Recipes applied
  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType ×3)

Example

Before
import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.autoconfigure.web.embedded.NettyWebServerFactoryCustomizer;
import org.springframework.boot.autoconfigure.reactor.netty.ReactorNettyConfigurations;
import org.springframework.boot.autoconfigure.reactor.netty.ReactorNettyProperties;

class Demo {
    NettyReactiveWebServerFactory webServerFactory = null;
    NettyWebServerFactoryCustomizer customizer = null;
    ReactorNettyConfigurations configurations = null;
    ReactorNettyProperties properties = null;
}
After
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.reactor.netty.autoconfigure.NettyReactiveWebServerFactoryCustomizer;
import org.springframework.boot.reactor.netty.autoconfigure.ReactorNettyConfigurations;
import org.springframework.boot.reactor.netty.autoconfigure.ReactorNettyProperties;

class Demo {
    NettyReactiveWebServerFactory webServerFactory = null;
    NettyReactiveWebServerFactoryCustomizer customizer = null;
    ReactorNettyConfigurations configurations = null;
    ReactorNettyProperties properties = null;
}

Migrate Spring Boot Reactor module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateReactorModule

Migrate Spring Boot Reactor module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×2)

Example

Before
import org.springframework.boot.autoconfigure.reactor.ReactorAutoConfiguration;
import org.springframework.boot.autoconfigure.reactor.ReactorProperties;

class Demo {
    ReactorAutoConfiguration autoConfiguration = null;
    ReactorProperties properties = null;
}
After
import org.springframework.boot.reactor.autoconfigure.ReactorAutoConfiguration;
import org.springframework.boot.reactor.autoconfigure.ReactorProperties;

class Demo {
    ReactorAutoConfiguration autoConfiguration = null;
    ReactorProperties properties = null;
}

Migrate Spring Boot RestClient module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateRestClientModule

Migrate Spring Boot RestClient module to Spring Boot 4.0.

Recipes applied
  • Add RestClient Starter (io.arconia.rewrite.spring.boot4.AddRestClientStarter)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency ×2)

  • Add RestClient Starter Test (io.arconia.rewrite.spring.boot4.AddRestClientStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×6)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType ×9)

Example

Before
package com.yourorg;

import org.springframework.boot.web.client.RestTemplateBuilder;

class Demo {
  RestTemplateBuilder builder = null;
}
After
package com.yourorg;

import org.springframework.boot.restclient.RestTemplateBuilder;

class Demo {
  RestTemplateBuilder builder = null;
}
Before
plugins {
    id "java-library"
}

repositories {
    mavenCentral()
}
After
plugins {
    id "java-library"
}

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.springframework.boot:spring-boot-starter-restclient"

    testImplementation "org.springframework.boot:spring-boot-starter-restclient-test"
}

Migrate Spring Boot RestTestClient module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateRestTestClientModule

Migrate Spring Boot RestTestClient module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType)

  • Add RestTestClient Module (io.arconia.rewrite.spring.boot4.AddRestTestClientModule)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency ×2)

Example

Before
import org.springframework.boot.test.web.client.TestRestTemplate;

class Demo {
    TestRestTemplate testRestTemplate = null;
}
After
import org.springframework.boot.resttestclient.TestRestTemplate;

class Demo {
    TestRestTemplate testRestTemplate = null;
}

Migrate Spring Boot SQL module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateSqlModule

Migrate Spring Boot SQL module to Spring Boot 4.0.

Recipes applied
  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType ×3)

Example

Before
import org.springframework.boot.autoconfigure.sql.init.OnDatabaseInitializationCondition;
import org.springframework.boot.autoconfigure.sql.init.SqlInitializationProperties;
import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;

class Demo {
    OnDatabaseInitializationCondition onDatabaseInitializationCondition = null;
    SqlInitializationProperties sqlInitializationProperties = null;
    EntityManagerFactoryBuilder entityManagerFactoryBuilder = null;
}
After
import org.springframework.boot.jpa.EntityManagerFactoryBuilder;
import org.springframework.boot.sql.autoconfigure.init.OnDatabaseInitializationCondition;
import org.springframework.boot.sql.autoconfigure.init.SqlInitializationProperties;

class Demo {
    OnDatabaseInitializationCondition onDatabaseInitializationCondition = null;
    SqlInitializationProperties sqlInitializationProperties = null;
    EntityManagerFactoryBuilder entityManagerFactoryBuilder = null;
}

Migrate Spring Boot Security OAuth2 Authorization Server module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateSecurityOAuth2AuthorizationServerModule

Migrate Spring Boot Security OAuth2 Authorization Server module to Spring Boot 4.0.

Recipes applied

Example

Before
import org.springframework.boot.autoconfigure.security.oauth2.server.servlet.OAuth2AuthorizationServerAutoConfiguration;

class Demo {
    OAuth2AuthorizationServerAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.security.oauth2.server.authorization.autoconfigure.servlet.OAuth2AuthorizationServerAutoConfiguration;

class Demo {
    OAuth2AuthorizationServerAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot Security OAuth2 Client module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateSecurityOAuth2ClientModule

Migrate Spring Boot Security OAuth2 Client module to Spring Boot 4.0.

Recipes applied
  • Migrate Security OAuth2 Client Starter (io.arconia.rewrite.spring.boot4.MigrateSecurityOAuth2ClientStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Security OAuth2 Client Starter Test (io.arconia.rewrite.spring.boot4.AddSecurityOAuth2ClientStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage ×2)

  • Change type (org.openrewrite.java.ChangeType ×2)

Example

Before
import org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientAutoConfiguration;
import org.springframework.boot.autoconfigure.security.oauth2.client.reactive.ReactiveOAuth2ClientAutoConfiguration;
import org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientWebSecurityAutoConfiguration;

class Demo {
    OAuth2ClientAutoConfiguration autoConfiguration = null;
    ReactiveOAuth2ClientAutoConfiguration reactiveAutoConfiguration = null;
    OAuth2ClientWebSecurityAutoConfiguration webSecurityAutoConfiguration = null;
}
After
import org.springframework.boot.security.oauth2.client.autoconfigure.OAuth2ClientAutoConfiguration;
import org.springframework.boot.security.oauth2.client.autoconfigure.reactive.ReactiveOAuth2ClientAutoConfiguration;
import org.springframework.boot.security.oauth2.client.autoconfigure.servlet.OAuth2ClientWebSecurityAutoConfiguration;

class Demo {
    OAuth2ClientAutoConfiguration autoConfiguration = null;
    ReactiveOAuth2ClientAutoConfiguration reactiveAutoConfiguration = null;
    OAuth2ClientWebSecurityAutoConfiguration webSecurityAutoConfiguration = null;
}

Migrate Spring Boot Security OAuth2 Resource Server module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateSecurityOAuth2ResourceServerModule

Migrate Spring Boot Security OAuth2 Resource Server module to Spring Boot 4.0.

Recipes applied
  • Migrate Security OAuth2 Resource Server Starter (io.arconia.rewrite.spring.boot4.MigrateSecurityOAuth2ResourceServerStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Security OAuth2 Resource Server Starter Test (io.arconia.rewrite.spring.boot4.AddSecurityOAuth2ResourceServerStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage ×4)

  • Change type (org.openrewrite.java.ChangeType ×2)

Example

Before
import org.springframework.boot.autoconfigure.security.oauth2.client.reactive.ReactiveOAuth2ClientAutoConfiguration;
import org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientWebSecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.oauth2.resource.OAuth2ResourceServerProperties;
import org.springframework.boot.autoconfigure.security.oauth2.resource.reactive.ReactiveOAuth2ResourceServerAutoConfiguration;
import org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration;

class Demo {
    ReactiveOAuth2ClientAutoConfiguration reactiveClientAutoConfiguration = null;
    OAuth2ClientWebSecurityAutoConfiguration clientWebSecurityAutoConfiguration = null;
    OAuth2ResourceServerProperties resourceServerProperties = null;
    ReactiveOAuth2ResourceServerAutoConfiguration reactiveResourceServerAutoConfiguration = null;
    OAuth2ResourceServerAutoConfiguration resourceServerAutoConfiguration = null;
}
After
import org.springframework.boot.security.oauth2.client.autoconfigure.reactive.ReactiveOAuth2ClientAutoConfiguration;
import org.springframework.boot.security.oauth2.client.autoconfigure.servlet.OAuth2ClientWebSecurityAutoConfiguration;
import org.springframework.boot.security.oauth2.server.resource.autoconfigure.OAuth2ResourceServerProperties;
import org.springframework.boot.security.oauth2.server.resource.autoconfigure.reactive.ReactiveOAuth2ResourceServerAutoConfiguration;
import org.springframework.boot.security.oauth2.server.resource.autoconfigure.servlet.OAuth2ResourceServerAutoConfiguration;

class Demo {
    ReactiveOAuth2ClientAutoConfiguration reactiveClientAutoConfiguration = null;
    OAuth2ClientWebSecurityAutoConfiguration clientWebSecurityAutoConfiguration = null;
    OAuth2ResourceServerProperties resourceServerProperties = null;
    ReactiveOAuth2ResourceServerAutoConfiguration reactiveResourceServerAutoConfiguration = null;
    OAuth2ResourceServerAutoConfiguration resourceServerAutoConfiguration = null;
}

Migrate Spring Boot Security SAML2 module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateSecuritySaml2Module

Migrate Spring Boot Security SAML2 module to Spring Boot 4.0.

Recipes applied
  • Add Security SAML Starter (io.arconia.rewrite.spring.boot4.AddSecuritySamlStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Security SAML Starter Test (io.arconia.rewrite.spring.boot4.AddSecuritySamlStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.autoconfigure.security.saml2.Saml2RelyingPartyAutoConfiguration;

class Demo {
    Saml2RelyingPartyAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.security.saml2.autoconfigure.Saml2RelyingPartyAutoConfiguration;

class Demo {
    Saml2RelyingPartyAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot Security module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateSecurityModule

Migrate Spring Boot Security module to Spring Boot 4.0.

Recipes applied
  • Migrate Security Test (io.arconia.rewrite.spring.boot4.MigrateSecurityTest)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Security Starter Test (io.arconia.rewrite.spring.boot4.AddSecurityStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×21)

Example

Before
import org.springframework.boot.actuate.autoconfigure.security.reactive.EndpointRequest;
import org.springframework.boot.actuate.autoconfigure.security.reactive.ReactiveManagementWebSecurityAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.security.servlet.RequestMatcherProvider;
import org.springframework.boot.autoconfigure.security.ConditionalOnDefaultWebSecurity;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.autoconfigure.security.StaticResourceLocation;
import org.springframework.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration;
import org.springframework.boot.autoconfigure.security.rsocket.RSocketSecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration;
import org.springframework.boot.security.reactive.ApplicationContextServerWebExchangeMatcher;
import org.springframework.boot.security.servlet.ApplicationContextRequestMatcher;

class Demo {
    EndpointRequest reactiveEndpointRequest = null;
    ReactiveManagementWebSecurityAutoConfiguration reactiveManagementWebSecurityAutoConfiguration = null;
    ManagementWebSecurityAutoConfiguration managementWebSecurityAutoConfiguration = null;
    RequestMatcherProvider requestMatcherProvider = null;
    ConditionalOnDefaultWebSecurity conditionalOnDefaultWebSecurity = null;
    SecurityProperties securityProperties = null;
    StaticResourceLocation staticResourceLocation = null;
    ReactiveSecurityAutoConfiguration reactiveSecurityAutoConfiguration = null;
    ReactiveUserDetailsServiceAutoConfiguration reactiveUserDetailsServiceAutoConfiguration = null;
    RSocketSecurityAutoConfiguration rSocketSecurityAutoConfiguration = null;
    SecurityAutoConfiguration securityAutoConfiguration = null;
    SecurityFilterAutoConfiguration securityFilterAutoConfiguration = null;
    UserDetailsServiceAutoConfiguration userDetailsServiceAutoConfiguration = null;
    ApplicationContextServerWebExchangeMatcher applicationContextServerWebExchangeMatcher = null;
    ApplicationContextRequestMatcher applicationContextRequestMatcher = null;
    org.springframework.boot.autoconfigure.security.reactive.PathRequest reactivePathRequest = null;
    org.springframework.boot.autoconfigure.security.servlet.PathRequest servletPathRequest = null;
    org.springframework.boot.autoconfigure.security.reactive.StaticResourceRequest reactiveStaticResourceRequest = null;
    org.springframework.boot.autoconfigure.security.servlet.StaticResourceRequest servletStaticResourceRequest = null;
}
After
import org.springframework.boot.security.autoconfigure.ReactiveUserDetailsServiceAutoConfiguration;
import org.springframework.boot.security.autoconfigure.SecurityProperties;
import org.springframework.boot.security.autoconfigure.UserDetailsServiceAutoConfiguration;
import org.springframework.boot.security.autoconfigure.actuate.web.reactive.EndpointRequest;
import org.springframework.boot.security.autoconfigure.actuate.web.reactive.ReactiveManagementWebSecurityAutoConfiguration;
import org.springframework.boot.security.autoconfigure.actuate.web.servlet.ManagementWebSecurityAutoConfiguration;
import org.springframework.boot.security.autoconfigure.actuate.web.servlet.SecurityRequestMatchersManagementContextConfiguration;
import org.springframework.boot.security.autoconfigure.rsocket.RSocketSecurityAutoConfiguration;
import org.springframework.boot.security.autoconfigure.web.StaticResourceLocation;
import org.springframework.boot.security.autoconfigure.web.reactive.PathRequest;
import org.springframework.boot.security.autoconfigure.web.reactive.ReactiveWebSecurityAutoConfiguration;
import org.springframework.boot.security.autoconfigure.web.reactive.StaticResourceRequest;
import org.springframework.boot.security.autoconfigure.web.servlet.ConditionalOnDefaultWebSecurity;
import org.springframework.boot.security.autoconfigure.web.servlet.SecurityFilterAutoConfiguration;
import org.springframework.boot.security.autoconfigure.web.servlet.ServletWebSecurityAutoConfiguration;
import org.springframework.boot.security.web.reactive.ApplicationContextServerWebExchangeMatcher;
import org.springframework.boot.security.web.servlet.ApplicationContextRequestMatcher;

class Demo {
    EndpointRequest reactiveEndpointRequest = null;
    ReactiveManagementWebSecurityAutoConfiguration reactiveManagementWebSecurityAutoConfiguration = null;
    ManagementWebSecurityAutoConfiguration managementWebSecurityAutoConfiguration = null;
    SecurityRequestMatchersManagementContextConfiguration requestMatcherProvider = null;
    ConditionalOnDefaultWebSecurity conditionalOnDefaultWebSecurity = null;
    SecurityProperties securityProperties = null;
    StaticResourceLocation staticResourceLocation = null;
    ReactiveWebSecurityAutoConfiguration reactiveSecurityAutoConfiguration = null;
    ReactiveUserDetailsServiceAutoConfiguration reactiveUserDetailsServiceAutoConfiguration = null;
    RSocketSecurityAutoConfiguration rSocketSecurityAutoConfiguration = null;
    ServletWebSecurityAutoConfiguration securityAutoConfiguration = null;
    SecurityFilterAutoConfiguration securityFilterAutoConfiguration = null;
    UserDetailsServiceAutoConfiguration userDetailsServiceAutoConfiguration = null;
    ApplicationContextServerWebExchangeMatcher applicationContextServerWebExchangeMatcher = null;
    ApplicationContextRequestMatcher applicationContextRequestMatcher = null;
    PathRequest reactivePathRequest = null;
    org.springframework.boot.security.autoconfigure.web.servlet.PathRequest servletPathRequest = null;
    StaticResourceRequest reactiveStaticResourceRequest = null;
    org.springframework.boot.security.autoconfigure.web.servlet.StaticResourceRequest servletStaticResourceRequest = null;
}

Migrate Spring Boot SendGrid module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateSendGridModule

Migrate Spring Boot SendGrid module to Spring Boot 4.0.

Recipes applied
  • Add SendGrid Starter Test (io.arconia.rewrite.spring.boot4.AddSendGridStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×2)

Example

Before
import org.springframework.boot.autoconfigure.sendgrid.SendGridAutoConfiguration;
import org.springframework.boot.autoconfigure.sendgrid.SendGridProperties;

class Demo {
    SendGridAutoConfiguration autoConfiguration = null;
    SendGridProperties properties = null;
}
After
import org.springframework.boot.sendgrid.autoconfigure.SendGridAutoConfiguration;
import org.springframework.boot.sendgrid.autoconfigure.SendGridProperties;

class Demo {
    SendGridAutoConfiguration autoConfiguration = null;
    SendGridProperties properties = null;
}

Migrate Spring Boot Servlet module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateServletModule

Migrate Spring Boot Servlet module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×13)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.actuate.autoconfigure.endpoint.web.ServletEndpointManagementContextConfiguration;
import org.springframework.boot.actuate.autoconfigure.web.servlet.ManagementServletContext;
import org.springframework.boot.actuate.web.mappings.servlet.FilterRegistrationMappingDescription;
import org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.boot.web.servlet.filter.OrderedFormContentFilter;

class Demo {
    ServletEndpointManagementContextConfiguration servletEndpointManagementContextConfiguration = null;
    ManagementServletContext managementServletContext = null;
    FilterRegistrationMappingDescription filterRegistrationMappingDescription = null;
    HttpEncodingAutoConfiguration httpEncodingAutoConfiguration = null;
    MultipartConfigFactory multipartConfigFactory = null;
    OrderedFormContentFilter orderedFormContentFilter = null;
}
After
import org.springframework.boot.servlet.MultipartConfigFactory;
import org.springframework.boot.servlet.actuate.web.mappings.FilterRegistrationMappingDescription;
import org.springframework.boot.servlet.autoconfigure.HttpEncodingAutoConfiguration;
import org.springframework.boot.servlet.autoconfigure.actuate.web.ManagementServletContext;
import org.springframework.boot.servlet.autoconfigure.actuate.web.ServletEndpointManagementContextConfiguration;
import org.springframework.boot.servlet.filter.OrderedFormContentFilter;

class Demo {
    ServletEndpointManagementContextConfiguration servletEndpointManagementContextConfiguration = null;
    ManagementServletContext managementServletContext = null;
    FilterRegistrationMappingDescription filterRegistrationMappingDescription = null;
    HttpEncodingAutoConfiguration httpEncodingAutoConfiguration = null;
    MultipartConfigFactory multipartConfigFactory = null;
    OrderedFormContentFilter orderedFormContentFilter = null;
}

Migrate Spring Boot Session Data Redis module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateSessionDataRedisModule

Migrate Spring Boot Session Data Redis module to Spring Boot 4.0.

Recipes applied
  • Add Session Data Redis Starter (io.arconia.rewrite.spring.boot4.AddSessionDataRedisStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Session Data Redis Starter Test (io.arconia.rewrite.spring.boot4.AddSessionDataRedisStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType)

Example

Before
import org.springframework.boot.autoconfigure.session.RedisSessionProperties;

class Demo {
    RedisSessionProperties redisSessionProperties = null;
}
After
import org.springframework.boot.session.data.redis.autoconfigure.SessionDataRedisProperties;

class Demo {
    SessionDataRedisProperties redisSessionProperties = null;
}

Migrate Spring Boot Session JDBC module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateSessionJdbcModule

Migrate Spring Boot Session JDBC module to Spring Boot 4.0.

Recipes applied
  • Add Session JDBC Starter (io.arconia.rewrite.spring.boot4.AddSessionJdbcStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Session JDBC Starter Test (io.arconia.rewrite.spring.boot4.AddSessionJdbcStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×2)

Example

Before
import org.springframework.boot.autoconfigure.session.JdbcSessionDataSourceScriptDatabaseInitializer;

class Demo {
    JdbcSessionDataSourceScriptDatabaseInitializer initializer = null;
}
After
import org.springframework.boot.session.jdbc.autoconfigure.JdbcSessionDataSourceScriptDatabaseInitializer;

class Demo {
    JdbcSessionDataSourceScriptDatabaseInitializer initializer = null;
}

Migrate Spring Boot Session module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateSessionModule

Migrate Spring Boot Session module to Spring Boot 4.0.

Recipes applied
  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType ×4)

Example

Before
import org.springframework.boot.actuate.autoconfigure.session.SessionsEndpointAutoConfiguration;
import org.springframework.boot.actuate.session.SessionsEndpoint;
import org.springframework.boot.autoconfigure.session.DefaultCookieSerializerCustomizer;
import org.springframework.boot.autoconfigure.session.SessionAutoConfiguration;
import org.springframework.boot.autoconfigure.session.SessionProperties;

class Demo {
    SessionsEndpoint sessionsEndpoint = null;
    DefaultCookieSerializerCustomizer defaultCookieSerializerCustomizer = null;
    SessionAutoConfiguration sessionAutoConfiguration = null;
    SessionProperties sessionProperties = null;
    SessionsEndpointAutoConfiguration sessionsEndpointAutoConfiguration = null;
}
After
import org.springframework.boot.session.actuate.endpoint.SessionsEndpoint;
import org.springframework.boot.session.autoconfigure.DefaultCookieSerializerCustomizer;
import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration;
import org.springframework.boot.session.autoconfigure.SessionProperties;
import org.springframework.boot.session.autoconfigure.SessionsEndpointAutoConfiguration;

class Demo {
    SessionsEndpoint sessionsEndpoint = null;
    DefaultCookieSerializerCustomizer defaultCookieSerializerCustomizer = null;
    SessionAutoConfiguration sessionAutoConfiguration = null;
    SessionProperties sessionProperties = null;
    SessionsEndpointAutoConfiguration sessionsEndpointAutoConfiguration = null;
}

Migrate Spring Boot Thymeleaf module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateThymeleafModule

Migrate Spring Boot Thymeleaf module to Spring Boot 4.0.

Recipes applied
  • Add Thymeleaf Starter Test (io.arconia.rewrite.spring.boot4.AddThymeleafStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration;

class Demo {
    ThymeleafAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.thymeleaf.autoconfigure.ThymeleafAutoConfiguration;

class Demo {
    ThymeleafAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot Tomcat module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateTomcatModule

Migrate Spring Boot Tomcat module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×13)

Example

Before
import org.springframework.boot.actuate.autoconfigure.metrics.web.tomcat.TomcatMetricsAutoConfiguration;
import org.springframework.boot.actuate.metrics.web.tomcat.TomcatMetricsBinder;
import org.springframework.boot.autoconfigure.web.embedded.TomcatVirtualThreadsWebServerFactoryCustomizer;
import org.springframework.boot.autoconfigure.web.embedded.TomcatWebServerFactoryCustomizer;
import org.springframework.boot.web.embedded.tomcat.ConfigurableTomcatWebServerFactory;
import org.springframework.boot.web.embedded.tomcat.ConnectorStartFailedException;
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.web.embedded.tomcat.TomcatContextCustomizer;
import org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader;
import org.springframework.boot.web.embedded.tomcat.TomcatProtocolHandlerCustomizer;
import org.springframework.boot.web.embedded.tomcat.TomcatReactiveWebServerFactory;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.embedded.tomcat.TomcatWebServer;

class Demo {
    TomcatMetricsAutoConfiguration tomcatMetricsAutoConfiguration = null;
    TomcatMetricsBinder tomcatMetricsBinder = null;
    TomcatVirtualThreadsWebServerFactoryCustomizer tomcatVirtualThreadsWebServerFactoryCustomizer = null;
    TomcatWebServerFactoryCustomizer tomcatWebServerFactoryCustomizer = null;
    ConfigurableTomcatWebServerFactory configurableTomcatWebServerFactory = null;
    ConnectorStartFailedException connectorStartFailedException = null;
    TomcatConnectorCustomizer tomcatConnectorCustomizer = null;
    TomcatContextCustomizer tomcatContextCustomizer = null;
    TomcatEmbeddedWebappClassLoader tomcatEmbeddedWebappClassLoader = null;
    TomcatProtocolHandlerCustomizer tomcatProtocolHandlerCustomizer = null;
    TomcatReactiveWebServerFactory tomcatReactiveWebServerFactory = null;
    TomcatServletWebServerFactory tomcatServletWebServerFactory = null;
    TomcatWebServer tomcatWebServer = null;
}
After
import org.springframework.boot.tomcat.*;
import org.springframework.boot.tomcat.autoconfigure.TomcatVirtualThreadsWebServerFactoryCustomizer;
import org.springframework.boot.tomcat.autoconfigure.TomcatWebServerFactoryCustomizer;
import org.springframework.boot.tomcat.autoconfigure.metrics.TomcatMetricsAutoConfiguration;
import org.springframework.boot.tomcat.metrics.TomcatMetricsBinder;
import org.springframework.boot.tomcat.reactive.TomcatReactiveWebServerFactory;
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;

class Demo {
    TomcatMetricsAutoConfiguration tomcatMetricsAutoConfiguration = null;
    TomcatMetricsBinder tomcatMetricsBinder = null;
    TomcatVirtualThreadsWebServerFactoryCustomizer tomcatVirtualThreadsWebServerFactoryCustomizer = null;
    TomcatWebServerFactoryCustomizer tomcatWebServerFactoryCustomizer = null;
    ConfigurableTomcatWebServerFactory configurableTomcatWebServerFactory = null;
    ConnectorStartFailedException connectorStartFailedException = null;
    TomcatConnectorCustomizer tomcatConnectorCustomizer = null;
    TomcatContextCustomizer tomcatContextCustomizer = null;
    TomcatEmbeddedWebappClassLoader tomcatEmbeddedWebappClassLoader = null;
    TomcatProtocolHandlerCustomizer tomcatProtocolHandlerCustomizer = null;
    TomcatReactiveWebServerFactory tomcatReactiveWebServerFactory = null;
    TomcatServletWebServerFactory tomcatServletWebServerFactory = null;
    TomcatWebServer tomcatWebServer = null;
}

Migrate Spring Boot Transaction module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateTransactionModule

Migrate Spring Boot Transaction module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration;
import org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;

class Demo {
    TransactionAutoConfiguration transactionAutoConfiguration = null;
    JtaAutoConfiguration jtaAutoConfiguration = null;
}
After
import org.springframework.boot.transaction.autoconfigure.TransactionAutoConfiguration;
import org.springframework.boot.transaction.jta.autoconfigure.JtaAutoConfiguration;

class Demo {
    TransactionAutoConfiguration transactionAutoConfiguration = null;
    JtaAutoConfiguration jtaAutoConfiguration = null;
}

Migrate Spring Boot Validation module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateValidationModule

Migrate Spring Boot Validation module to Spring Boot 4.0.

Recipes applied
  • Add Validation Starter Test (io.arconia.rewrite.spring.boot4.AddValidationStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration;

class Demo {
    ValidationAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration;

class Demo {
    ValidationAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot Web MVC module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateWebMvcModule

Migrate Spring Boot Web MVC module to Spring Boot 4.0.

Recipes applied
  • Migrate Web MVC Starter (io.arconia.rewrite.spring.boot4.MigrateWebMvcStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Web MVC Starter Test (io.arconia.rewrite.spring.boot4.AddWebMvcStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType ×15)

  • Rename package name (org.openrewrite.java.ChangePackage ×2)

  • Change type (org.openrewrite.java.ChangeType ×11)

Example

Before
import org.springframework.boot.actuate.autoconfigure.endpoint.web.servlet.WebMvcEndpointManagementContextConfiguration;
import org.springframework.boot.actuate.autoconfigure.observation.web.servlet.WebMvcObservationAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.web.servlet.ManagementErrorEndpoint;
import org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping;
import org.springframework.boot.actuate.web.mappings.servlet.DispatcherServletMappingDescription;
import org.springframework.boot.actuate.web.mappings.servlet.DispatcherServletMappingDetails;
import org.springframework.boot.actuate.web.mappings.servlet.DispatcherServletsMappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.servlet.HandlerFunctionDescription;
import org.springframework.boot.actuate.web.mappings.servlet.RequestMappingConditionsDescription;
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath;
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletRegistrationBean;
import org.springframework.boot.autoconfigure.web.servlet.JspTemplateAvailabilityProvider;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcProperties;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcRegistrations;
import org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureWebMvc;
import org.springframework.boot.test.autoconfigure.web.servlet.MockMvcAutoConfiguration;
import org.springframework.boot.test.autoconfigure.web.servlet.MockMvcBuilderCustomizer;
import org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrint;
import org.springframework.boot.test.autoconfigure.web.servlet.MockMvcWebClientAutoConfiguration;
import org.springframework.boot.test.autoconfigure.web.servlet.MockMvcWebDriverAutoConfiguration;
import org.springframework.boot.test.autoconfigure.web.servlet.SpringBootMockMvcBuilderCustomizer;
import org.springframework.boot.test.autoconfigure.web.servlet.WebDriverScope;
import org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.web.servlet.error.ErrorAttributes;

class Demo {
    WebMvcEndpointManagementContextConfiguration webMvcEndpointManagementContextConfiguration = null;
    WebMvcObservationAutoConfiguration webMvcObservationAutoConfiguration = null;
    ManagementErrorEndpoint managementErrorEndpoint = null;
    WebMvcEndpointHandlerMapping webMvcEndpointHandlerMapping = null;
    DispatcherServletMappingDescription dispatcherServletMappingDescription = null;
    DispatcherServletMappingDetails dispatcherServletMappingDetails = null;
    DispatcherServletsMappingDescriptionProvider dispatcherServletsMappingDescriptionProvider = null;
    HandlerFunctionDescription handlerFunctionDescription = null;
    RequestMappingConditionsDescription requestMappingConditionsDescription = null;
    DispatcherServletAutoConfiguration dispatcherServletAutoConfiguration = null;
    DispatcherServletPath dispatcherServletPath = null;
    DispatcherServletRegistrationBean dispatcherServletRegistrationBean = null;
    JspTemplateAvailabilityProvider jspTemplateAvailabilityProvider = null;
    WebMvcAutoConfiguration webMvcAutoConfiguration = null;
    WebMvcProperties webMvcProperties = null;
    WebMvcRegistrations webMvcRegistrations = null;
    BasicErrorController basicErrorController = null;
    AutoConfigureMockMvc autoConfigureMockMvc = null;
    AutoConfigureWebMvc autoConfigureWebMvc = null;
    MockMvcAutoConfiguration mockMvcAutoConfiguration = null;
    MockMvcBuilderCustomizer mockMvcBuilderCustomizer = null;
    MockMvcPrint mockMvcPrint = null;
    MockMvcWebClientAutoConfiguration mockMvcWebClientAutoConfiguration = null;
    MockMvcWebDriverAutoConfiguration mockMvcWebDriverAutoConfiguration = null;
    SpringBootMockMvcBuilderCustomizer springBootMockMvcBuilderCustomizer = null;
    WebDriverScope webDriverScope = null;
    WebDriverTestExecutionListener webDriverTestExecutionListener = null;
    WebMvcTest webMvcTest = null;
    ErrorAttributes errorAttributes = null;
}
After
import org.springframework.boot.webmvc.actuate.endpoint.web.WebMvcEndpointHandlerMapping;
import org.springframework.boot.webmvc.actuate.web.mappings.*;
import org.springframework.boot.webmvc.autoconfigure.*;
import org.springframework.boot.webmvc.autoconfigure.actuate.web.ManagementErrorEndpoint;
import org.springframework.boot.webmvc.autoconfigure.actuate.web.WebMvcEndpointManagementContextConfiguration;
import org.springframework.boot.webmvc.autoconfigure.error.BasicErrorController;
import org.springframework.boot.webmvc.error.ErrorAttributes;
import org.springframework.boot.webmvc.test.autoconfigure.*;

class Demo {
    WebMvcEndpointManagementContextConfiguration webMvcEndpointManagementContextConfiguration = null;
    WebMvcObservationAutoConfiguration webMvcObservationAutoConfiguration = null;
    ManagementErrorEndpoint managementErrorEndpoint = null;
    WebMvcEndpointHandlerMapping webMvcEndpointHandlerMapping = null;
    DispatcherServletMappingDescription dispatcherServletMappingDescription = null;
    DispatcherServletMappingDetails dispatcherServletMappingDetails = null;
    DispatcherServletsMappingDescriptionProvider dispatcherServletsMappingDescriptionProvider = null;
    HandlerFunctionDescription handlerFunctionDescription = null;
    RequestMappingConditionsDescription requestMappingConditionsDescription = null;
    DispatcherServletAutoConfiguration dispatcherServletAutoConfiguration = null;
    DispatcherServletPath dispatcherServletPath = null;
    DispatcherServletRegistrationBean dispatcherServletRegistrationBean = null;
    JspTemplateAvailabilityProvider jspTemplateAvailabilityProvider = null;
    WebMvcAutoConfiguration webMvcAutoConfiguration = null;
    WebMvcProperties webMvcProperties = null;
    WebMvcRegistrations webMvcRegistrations = null;
    BasicErrorController basicErrorController = null;
    AutoConfigureMockMvc autoConfigureMockMvc = null;
    AutoConfigureWebMvc autoConfigureWebMvc = null;
    MockMvcAutoConfiguration mockMvcAutoConfiguration = null;
    MockMvcBuilderCustomizer mockMvcBuilderCustomizer = null;
    MockMvcPrint mockMvcPrint = null;
    MockMvcWebClientAutoConfiguration mockMvcWebClientAutoConfiguration = null;
    MockMvcWebDriverAutoConfiguration mockMvcWebDriverAutoConfiguration = null;
    SpringBootMockMvcBuilderCustomizer springBootMockMvcBuilderCustomizer = null;
    WebDriverScope webDriverScope = null;
    WebDriverTestExecutionListener webDriverTestExecutionListener = null;
    WebMvcTest webMvcTest = null;
    ErrorAttributes errorAttributes = null;
}

Migrate Spring Boot Web Server module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateWebServerModule

Migrate Spring Boot Web Server module to Spring Boot 4.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×24)

Example

Before
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.autoconfigure.web.reactive.ReactiveWebServerFactoryCustomizer;
import org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryCustomizer;
import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext;
import org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext;
import org.springframework.boot.web.reactive.context.ReactiveWebServerInitializedEvent;
import org.springframework.boot.web.reactive.server.AbstractReactiveWebServerFactory;
import org.springframework.boot.web.reactive.server.ConfigurableReactiveWebServerFactory;
import org.springframework.boot.web.reactive.server.ReactiveWebServerFactory;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.WebListenerRegistrar;
import org.springframework.boot.web.servlet.WebListenerRegistry;
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext;
import org.springframework.boot.web.servlet.context.ServletWebServerInitializedEvent;
import org.springframework.boot.web.servlet.context.WebApplicationContextServletContextAwareProcessor;
import org.springframework.boot.web.servlet.context.XmlServletWebServerApplicationContext;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
import org.springframework.boot.web.servlet.server.CookieSameSiteSupplier;
import org.springframework.boot.web.servlet.server.Jsp;
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
import org.springframework.boot.web.servlet.server.Session;

class Demo {
    ServerProperties serverProperties = null;
    ReactiveWebServerFactoryCustomizer reactiveWebServerFactoryCustomizer = null;
    ServletWebServerFactoryCustomizer servletWebServerFactoryCustomizer = null;
    AbstractReactiveWebServerFactory abstractReactiveWebServerFactory = null;
    ConfigurableReactiveWebServerFactory configurableReactiveWebServerFactory = null;
    ReactiveWebServerFactory reactiveWebServerFactory = null;
    AnnotationConfigReactiveWebServerApplicationContext annotationConfigReactiveWebServerApplicationContext = null;
    ReactiveWebServerApplicationContext reactiveWebServerApplicationContext = null;
    ReactiveWebServerInitializedEvent reactiveWebServerInitializedEvent = null;
    ConfigurableServletWebServerFactory configurableServletWebServerFactory = null;
    CookieSameSiteSupplier cookieSameSiteSupplier = null;
    Jsp jsp = null;
    ServletWebServerFactory servletWebServerFactory = null;
    Session session = null;
    WebListenerRegistrar webListenerRegistrar = null;
    WebListenerRegistry webListenerRegistry = null;
    AnnotationConfigServletWebServerApplicationContext annotationConfigServletWebServerApplicationContext = null;
    ServletComponentScan servletComponentScan = null;
    ServletWebServerApplicationContext servletWebServerApplicationContext = null;
    ServletWebServerInitializedEvent servletWebServerInitializedEvent = null;
    WebApplicationContextServletContextAwareProcessor webApplicationContextServletContextAwareProcessor = null;
    XmlServletWebServerApplicationContext xmlServletWebServerApplicationContext = null;
}
After
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.web.server.autoconfigure.reactive.ReactiveWebServerFactoryCustomizer;
import org.springframework.boot.web.server.autoconfigure.servlet.ServletWebServerFactoryCustomizer;
import org.springframework.boot.web.server.reactive.AbstractReactiveWebServerFactory;
import org.springframework.boot.web.server.reactive.ConfigurableReactiveWebServerFactory;
import org.springframework.boot.web.server.reactive.ReactiveWebServerFactory;
import org.springframework.boot.web.server.reactive.context.AnnotationConfigReactiveWebServerApplicationContext;
import org.springframework.boot.web.server.reactive.context.ReactiveWebServerApplicationContext;
import org.springframework.boot.web.server.reactive.context.ReactiveWebServerInitializedEvent;
import org.springframework.boot.web.server.servlet.*;
import org.springframework.boot.web.server.servlet.context.*;

class Demo {
    ServerProperties serverProperties = null;
    ReactiveWebServerFactoryCustomizer reactiveWebServerFactoryCustomizer = null;
    ServletWebServerFactoryCustomizer servletWebServerFactoryCustomizer = null;
    AbstractReactiveWebServerFactory abstractReactiveWebServerFactory = null;
    ConfigurableReactiveWebServerFactory configurableReactiveWebServerFactory = null;
    ReactiveWebServerFactory reactiveWebServerFactory = null;
    AnnotationConfigReactiveWebServerApplicationContext annotationConfigReactiveWebServerApplicationContext = null;
    ReactiveWebServerApplicationContext reactiveWebServerApplicationContext = null;
    ReactiveWebServerInitializedEvent reactiveWebServerInitializedEvent = null;
    ConfigurableServletWebServerFactory configurableServletWebServerFactory = null;
    CookieSameSiteSupplier cookieSameSiteSupplier = null;
    Jsp jsp = null;
    ServletWebServerFactory servletWebServerFactory = null;
    Session session = null;
    WebListenerRegistrar webListenerRegistrar = null;
    WebListenerRegistry webListenerRegistry = null;
    AnnotationConfigServletWebServerApplicationContext annotationConfigServletWebServerApplicationContext = null;
    ServletComponentScan servletComponentScan = null;
    ServletWebServerApplicationContext servletWebServerApplicationContext = null;
    ServletWebServerInitializedEvent servletWebServerInitializedEvent = null;
    WebApplicationContextServletContextAwareProcessor webApplicationContextServletContextAwareProcessor = null;
    XmlServletWebServerApplicationContext xmlServletWebServerApplicationContext = null;
}

Migrate Spring Boot Web Services module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateWebServicesModule

Migrate Spring Boot Web Services module to Spring Boot 4.0.

Recipes applied
  • Migrate Web Services Starter (io.arconia.rewrite.spring.boot4.MigrateWebServicesStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Web Services Starter Test (io.arconia.rewrite.spring.boot4.AddWebServicesStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×3)

Example

Before
import org.springframework.boot.autoconfigure.webservices.WebServicesAutoConfiguration;
import org.springframework.boot.autoconfigure.webservices.WebServicesProperties;
import org.springframework.boot.autoconfigure.webservices.client.WebServiceTemplateAutoConfiguration;

class Demo {
    WebServicesAutoConfiguration autoConfiguration = null;
    WebServicesProperties properties = null;
    WebServiceTemplateAutoConfiguration templateAutoConfiguration = null;
}
After
import org.springframework.boot.webservices.autoconfigure.WebServicesAutoConfiguration;
import org.springframework.boot.webservices.autoconfigure.WebServicesProperties;
import org.springframework.boot.webservices.autoconfigure.client.WebServiceTemplateAutoConfiguration;

class Demo {
    WebServicesAutoConfiguration autoConfiguration = null;
    WebServicesProperties properties = null;
    WebServiceTemplateAutoConfiguration templateAutoConfiguration = null;
}

Migrate Spring Boot WebClient module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateWebClientModule

Migrate Spring Boot WebClient module to Spring Boot 4.0.

Recipes applied
  • Add WebClient Starter (io.arconia.rewrite.spring.boot4.AddWebClientStarter)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Add WebClient Starter Test (io.arconia.rewrite.spring.boot4.AddWebClientStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×6)

Example

Before
import org.springframework.boot.actuate.metrics.web.reactive.client.ObservationWebClientCustomizer;
import org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration;
import org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientCodecCustomizer;
import org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientSsl;
import org.springframework.boot.test.autoconfigure.web.client.AutoConfigureWebClient;
import org.springframework.boot.web.reactive.function.client.WebClientCustomizer;

class Demo {
    ObservationWebClientCustomizer observationWebClientCustomizer = null;
    WebClientAutoConfiguration webClientAutoConfiguration = null;
    WebClientCodecCustomizer webClientCodecCustomizer = null;
    WebClientSsl webClientSsl = null;
    AutoConfigureWebClient autoConfigureWebClient = null;
    WebClientCustomizer webClientCustomizer = null;
}
After
import org.springframework.boot.webclient.WebClientCustomizer;
import org.springframework.boot.webclient.autoconfigure.WebClientAutoConfiguration;
import org.springframework.boot.webclient.autoconfigure.WebClientCodecCustomizer;
import org.springframework.boot.webclient.autoconfigure.WebClientSsl;
import org.springframework.boot.webclient.observation.AutoConfigureWebClient;
import org.springframework.boot.webclient.observation.ObservationWebClientCustomizer;

class Demo {
    ObservationWebClientCustomizer observationWebClientCustomizer = null;
    WebClientAutoConfiguration webClientAutoConfiguration = null;
    WebClientCodecCustomizer webClientCodecCustomizer = null;
    WebClientSsl webClientSsl = null;
    AutoConfigureWebClient autoConfigureWebClient = null;
    WebClientCustomizer webClientCustomizer = null;
}

Migrate Spring Boot WebFlux module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateWebFluxModule

Migrate Spring Boot WebFlux module to Spring Boot 4.0.

Recipes applied
  • Add WebFlux Starter Test (io.arconia.rewrite.spring.boot4.AddWebFluxStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage ×3)

  • Change type (org.openrewrite.java.ChangeType ×11)

  • Rename package name (org.openrewrite.java.ChangePackage ×3)

  • Change type (org.openrewrite.java.ChangeType ×2)

Example

Before
import org.springframework.boot.actuate.autoconfigure.endpoint.web.reactive.WebFluxEndpointManagementContextConfiguration;
import org.springframework.boot.actuate.autoconfigure.observation.web.reactive.WebFluxObservationAutoConfiguration;
import org.springframework.boot.actuate.endpoint.web.reactive.ControllerEndpointHandlerMapping;
import org.springframework.boot.actuate.web.exchanges.reactive.HttpExchangesWebFilter;
import org.springframework.boot.actuate.web.mappings.reactive.HandlerFunctionDescription;
import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration;
import org.springframework.boot.autoconfigure.web.reactive.ReactiveMultipartAutoConfiguration;
import org.springframework.boot.autoconfigure.web.reactive.ReactiveMultipartProperties;
import org.springframework.boot.autoconfigure.web.reactive.ResourceHandlerRegistrationCustomizer;
import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration;
import org.springframework.boot.autoconfigure.web.reactive.WebFluxProperties;
import org.springframework.boot.autoconfigure.web.reactive.WebFluxRegistrations;
import org.springframework.boot.autoconfigure.web.reactive.WebHttpHandlerBuilderCustomizer;
import org.springframework.boot.autoconfigure.web.reactive.WebSessionIdResolverAutoConfiguration;
import org.springframework.boot.autoconfigure.web.reactive.error.DefaultErrorWebExceptionHandler;
import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebFlux;
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest;
import org.springframework.boot.web.reactive.error.ErrorAttributes;
import org.springframework.boot.web.reactive.filter.OrderedWebFilter;

class Demo {
    WebFluxEndpointManagementContextConfiguration webFluxEndpointManagementContextConfiguration = null;
    WebFluxObservationAutoConfiguration webFluxObservationAutoConfiguration = null;
    ControllerEndpointHandlerMapping controllerEndpointHandlerMapping = null;
    HttpExchangesWebFilter httpExchangesWebFilter = null;
    HandlerFunctionDescription handlerFunctionDescription = null;
    HttpHandlerAutoConfiguration httpHandlerAutoConfiguration = null;
    ReactiveMultipartAutoConfiguration reactiveMultipartAutoConfiguration = null;
    ReactiveMultipartProperties reactiveMultipartProperties = null;
    ResourceHandlerRegistrationCustomizer resourceHandlerRegistrationCustomizer = null;
    WebFluxAutoConfiguration webFluxAutoConfiguration = null;
    WebFluxProperties webFluxProperties = null;
    WebFluxRegistrations webFluxRegistrations = null;
    WebHttpHandlerBuilderCustomizer webHttpHandlerBuilderCustomizer = null;
    WebSessionIdResolverAutoConfiguration webSessionIdResolverAutoConfiguration = null;
    DefaultErrorWebExceptionHandler defaultErrorWebExceptionHandler = null;
    AutoConfigureWebFlux autoConfigureWebFlux = null;
    WebFluxTest webFluxTest = null;
    ErrorAttributes errorAttributes = null;
    OrderedWebFilter orderedWebFilter = null;
}
After
import org.springframework.boot.webflux.actuate.endpoint.web.ControllerEndpointHandlerMapping;
import org.springframework.boot.webflux.actuate.web.exchanges.HttpExchangesWebFilter;
import org.springframework.boot.webflux.actuate.web.mappings.HandlerFunctionDescription;
import org.springframework.boot.webflux.autoconfigure.*;
import org.springframework.boot.webflux.autoconfigure.actuate.web.WebFluxEndpointManagementContextConfiguration;
import org.springframework.boot.webflux.autoconfigure.error.DefaultErrorWebExceptionHandler;
import org.springframework.boot.webflux.error.ErrorAttributes;
import org.springframework.boot.webflux.filter.OrderedWebFilter;
import org.springframework.boot.webflux.test.autoconfigure.AutoConfigureWebFlux;
import org.springframework.boot.webflux.test.autoconfigure.WebFluxTest;

class Demo {
    WebFluxEndpointManagementContextConfiguration webFluxEndpointManagementContextConfiguration = null;
    WebFluxObservationAutoConfiguration webFluxObservationAutoConfiguration = null;
    ControllerEndpointHandlerMapping controllerEndpointHandlerMapping = null;
    HttpExchangesWebFilter httpExchangesWebFilter = null;
    HandlerFunctionDescription handlerFunctionDescription = null;
    HttpHandlerAutoConfiguration httpHandlerAutoConfiguration = null;
    ReactiveMultipartAutoConfiguration reactiveMultipartAutoConfiguration = null;
    ReactiveMultipartProperties reactiveMultipartProperties = null;
    ResourceHandlerRegistrationCustomizer resourceHandlerRegistrationCustomizer = null;
    WebFluxAutoConfiguration webFluxAutoConfiguration = null;
    WebFluxProperties webFluxProperties = null;
    WebFluxRegistrations webFluxRegistrations = null;
    WebHttpHandlerBuilderCustomizer webHttpHandlerBuilderCustomizer = null;
    WebSessionIdResolverAutoConfiguration webSessionIdResolverAutoConfiguration = null;
    DefaultErrorWebExceptionHandler defaultErrorWebExceptionHandler = null;
    AutoConfigureWebFlux autoConfigureWebFlux = null;
    WebFluxTest webFluxTest = null;
    ErrorAttributes errorAttributes = null;
    OrderedWebFilter orderedWebFilter = null;
}

Migrate Spring Boot WebSocket module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateWebSocketModule

Migrate Spring Boot WebSocket module to Spring Boot 4.0.

Recipes applied
  • Add WebSocket Starter Test (io.arconia.rewrite.spring.boot4.AddWebSocketStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType)

Example

Before
import org.springframework.boot.autoconfigure.websocket.servlet.WebSocketMessagingAutoConfiguration;

class Demo {
    WebSocketMessagingAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.websocket.autoconfigure.servlet.WebSocketMessagingAutoConfiguration;

class Demo {
    WebSocketMessagingAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot WebTestClient module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateWebTestClientModule

Migrate Spring Boot WebTestClient module to Spring Boot 4.0.

Recipes applied
  • Add WebTestClient Module (io.arconia.rewrite.spring.boot4.AddWebTestClientModule)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Change type (org.openrewrite.java.ChangeType ×4)

Example

Before
import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient;
import org.springframework.boot.test.autoconfigure.web.reactive.SpringBootWebTestClientBuilderCustomizer;
import org.springframework.boot.test.autoconfigure.web.reactive.WebTestClientAutoConfiguration;
import org.springframework.boot.test.web.reactive.server.WebTestClientBuilderCustomizer;

class Demo {
    AutoConfigureWebTestClient autoConfigureWebTestClient = null;
    SpringBootWebTestClientBuilderCustomizer springBootWebTestClientBuilderCustomizer = null;
    WebTestClientAutoConfiguration webTestClientAutoConfiguration = null;
    WebTestClientBuilderCustomizer webTestClientBuilderCustomizer = null;
}
After
import org.springframework.boot.webtestclient.autoconfigure.AutoConfigureWebTestClient;
import org.springframework.boot.webtestclient.autoconfigure.SpringBootWebTestClientBuilderCustomizer;
import org.springframework.boot.webtestclient.autoconfigure.WebTestClientAutoConfiguration;
import org.springframework.boot.webtestclient.autoconfigure.WebTestClientBuilderCustomizer;

class Demo {
    AutoConfigureWebTestClient autoConfigureWebTestClient = null;
    SpringBootWebTestClientBuilderCustomizer springBootWebTestClientBuilderCustomizer = null;
    WebTestClientAutoConfiguration webTestClientAutoConfiguration = null;
    WebTestClientBuilderCustomizer webTestClientBuilderCustomizer = null;
}

Migrate Spring Boot Zipkin module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateZipkinModule

Migrate Spring Boot Zipkin module to Spring Boot 4.0.

Recipes applied
  • Add Zipkin Starter (io.arconia.rewrite.spring.boot4.AddZipkinStarter)

    • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Zipkin Starter Test (io.arconia.rewrite.spring.boot4.AddZipkinStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

    • Remove a Gradle or Maven dependency (org.openrewrite.java.dependencies.RemoveDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

Example

Before
import org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinAutoConfiguration;

class Demo {
    ZipkinAutoConfiguration autoConfiguration = null;
}
After
import org.springframework.boot.zipkin.autoconfigure.ZipkinAutoConfiguration;

class Demo {
    ZipkinAutoConfiguration autoConfiguration = null;
}

Migrate Spring Boot jOOQ module to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.MigrateJooqModule

Migrate Spring Boot jOOQ module to Spring Boot 4.0.

Recipes applied
  • Add jOOQ Starter Test (io.arconia.rewrite.spring.boot4.AddJooqStarterTest)

    • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Rename package name (org.openrewrite.java.ChangePackage)

  • Change type (org.openrewrite.java.ChangeType ×2)

Example

Before
import org.springframework.boot.autoconfigure.jooq.JooqProperties;
import org.springframework.boot.test.autoconfigure.jooq.AutoConfigureJooq;
import org.springframework.boot.test.autoconfigure.jooq.JooqTest;

class Demo {
    JooqProperties jooqProperties = null;
    AutoConfigureJooq autoConfigureJooq = null;
    JooqTest jooqTest = null;
}
After
import org.springframework.boot.jooq.autoconfigure.JooqProperties;
import org.springframework.boot.jooq.test.autoconfigure.AutoConfigureJooq;
import org.springframework.boot.jooq.test.autoconfigure.JooqTest;

class Demo {
    JooqProperties jooqProperties = null;
    AutoConfigureJooq autoConfigureJooq = null;
    JooqTest jooqTest = null;
}

Migrate Spring Boot properties to 4.0

io.arconia.rewrite.spring.boot4.UpgradeSpringBootProperties_4_0

Migrate Spring Boot configuration properties that were renamed or deprecated in the 4.0 release, across YAML and Properties configuration files.

Tags: spring, boot

Recipes applied

Example

Before
management.endpoints.enabled-by-default=true
spring.flyway.oracle-sqlplus=true
After
management.endpoints.access.default=true
spring.flyway.oracle.sqlplus=true

Migrate Spring Boot properties to 4.0 (generated)

io.arconia.rewrite.spring.boot4.UpgradeSpringBootPropertiesGenerated_4_0

Migrate Spring Boot configuration properties that were renamed or deprecated in the 4.0 release, across YAML and Properties configuration files.

Tags: spring, boot

Recipes applied

Migrate Spring Boot properties to 4.1

io.arconia.rewrite.spring.boot4.UpgradeSpringBootProperties_4_1

Migrate Spring Boot configuration properties that were renamed or deprecated in the 4.1 release, across YAML and Properties configuration files.

Tags: spring, boot

Recipes applied

Example

Before
management.endpoints.enabled-by-default=true
logging.file.max-history=10
After
management.endpoints.access.default=true
logging.logback.rollingpolicy.max-history=10

Migrate Spring Boot properties to 4.1 (generated)

io.arconia.rewrite.spring.boot4.UpgradeSpringBootPropertiesGenerated_4_1

Migrate Spring Boot configuration properties that were renamed or deprecated in the 4.1 release, across YAML and Properties configuration files.

Tags: spring, boot

Recipes applied

Migrate Spring Boot properties to 4.2

io.arconia.rewrite.spring.boot4.UpgradeSpringBootProperties_4_2

Migrate Spring Boot configuration properties that were renamed or deprecated in the 4.2 release, across YAML and Properties configuration files.

Tags: spring, boot

Recipes applied

Example

Before
server.forward-headers-strategy=native
After
server.request.header.forwarded.strategy=web-server
Before
server:
  forward-headers-strategy: NATIVE
After
server:
  request.header.forwarded.strategy: web-server
Before
server.forward-headers-strategy=framework
After
server.request.header.forwarded.strategy=framework

Migrate Spring Boot properties to 4.2 (generated)

io.arconia.rewrite.spring.boot4.UpgradeSpringBootPropertiesGenerated_4_2

Migrate Spring Boot configuration properties that were renamed or deprecated in the 4.2 release, across YAML and Properties configuration files.

Tags: spring, boot

Recipes applied

Migrate Web MVC Starter

io.arconia.rewrite.spring.boot4.MigrateWebMvcStarter

Migrate Web MVC Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Migrate Web Services Starter

io.arconia.rewrite.spring.boot4.MigrateWebServicesStarter

Migrate Web Services Starter.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

Migrate the Spring Boot AMQP module to the RabbitMQ module in Spring Boot 4.2

io.arconia.rewrite.spring.boot4.MigrateSpringBootRabbitMq_4_2

Keep an application on AMQP 0.9 when upgrading to Spring Boot 4.2 by moving from the AMQP starter and module, which now provide AMQP 1.0 support, to the RabbitMQ starter and module. Adopting AMQP 1.0 instead is a separate, manual migration to the spring-boot-starter-amqp-rabbitmq starter.

Tags: spring, boot

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency ×3)

  • Rename package name (org.openrewrite.java.ChangePackage ×5)

Example

Before
plugins {
    id 'java-library'
}

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.springframework.boot:spring-boot-starter-amqp"
    implementation "org.springframework.boot:spring-boot-amqp"
    testImplementation "org.springframework.boot:spring-boot-starter-amqp-test"
}
After
plugins {
    id 'java-library'
}

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.springframework.boot:spring-boot-starter-rabbitmq"
    implementation "org.springframework.boot:spring-boot-rabbitmq"
    testImplementation "org.springframework.boot:spring-boot-starter-rabbitmq-test"
}

Migrate the Spring Boot HTTP modules to Spring Boot 4.2

io.arconia.rewrite.spring.boot4.MigrateSpringBootHttp_4_2

Update usages of Spring Boot HTTP module APIs that were removed or replaced in Spring Boot 4.2. The HttpMessageConverters class removed from the HTTP Converter module is replaced with the Spring Framework interface of the same name. Both are iterable over the configured converters. Code that constructs the removed class needs to be reworked manually around the Spring Framework builders.

Tags: spring, boot

Recipes applied
  • Change type (org.openrewrite.java.ChangeType)

Example

Before
import org.springframework.boot.http.converter.autoconfigure.HttpMessageConverters;
import org.springframework.http.converter.HttpMessageConverter;

class Demo {
    void test(HttpMessageConverters converters) {
        for (HttpMessageConverter<?> converter : converters) {
            System.out.println(converter);
        }
    }
}
After
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.HttpMessageConverters;

class Demo {
    void test(HttpMessageConverters converters) {
        for (HttpMessageConverter<?> converter : converters) {
            System.out.println(converter);
        }
    }
}

Migrate the Spring Boot Web Server modules to Spring Boot 4.2

io.arconia.rewrite.spring.boot4.MigrateSpringBootWebServer_4_2

Update usages of Spring Boot Web Server module APIs that were deprecated or replaced in Spring Boot 4.2. The setUseForwardHeaders(boolean) method of the Jetty and Reactor Netty web server factories is replaced with setForwardedRequestHeaders(ForwardedRequestHeaders), selecting the "X-Forwarded" header family without prefix handling to keep the previous behavior. Usages of the deprecated ServerProperties.getForwardHeadersStrategy() method get a comment, since it does not reflect the new server.request.header.forwarded.strategy property.

Tags: spring, boot

Recipes applied

Example

Before
import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory;
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;

class Demo {
    void jetty(ConfigurableJettyWebServerFactory factory) {
        factory.setUseForwardHeaders(true);
    }

    void jettyDisabled(ConfigurableJettyWebServerFactory factory) {
        factory.setUseForwardHeaders(false);
    }

    void netty(NettyReactiveWebServerFactory factory) {
        factory.setUseForwardHeaders(true);
    }
}
After
import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory;
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.web.server.ForwardedRequestHeaders;

class Demo {
    void jetty(ConfigurableJettyWebServerFactory factory) {
        factory.setForwardedRequestHeaders(ForwardedRequestHeaders.X_FORWARDED_WITHOUT_PREFIX);
    }

    void jettyDisabled(ConfigurableJettyWebServerFactory factory) {
        factory.setForwardedRequestHeaders(null);
    }

    void netty(NettyReactiveWebServerFactory factory) {
        factory.setForwardedRequestHeaders(ForwardedRequestHeaders.X_FORWARDED_WITHOUT_PREFIX);
    }
}

Migrate to Spring Boot 4.0

io.arconia.rewrite.spring.boot4.UpgradeSpringBoot_4_0

Migrate a Spring Boot application to the latest Spring Boot 4.0.x release.

Tags: spring, boot

Recipes applied

Migrate to Spring Boot 4.1

io.arconia.rewrite.spring.boot4.UpgradeSpringBoot_4_1

Migrate a Spring Boot application to the latest Spring Boot 4.1.x release.

Tags: spring, boot

Recipes applied

Migrate to Spring Boot 4.2

io.arconia.rewrite.spring.boot4.UpgradeSpringBoot_4_2

Migrate a Spring Boot application to the latest Spring Boot 4.2.x release.

Tags: spring, boot

Recipes applied

Example

Before
spring.modulith.republish-outstanding-events-on-restart=true
spring.modulith.events.staleness.check-intervall=30s
spring.modulith.events.staleness.resubmission=5m
After
spring.modulith.events.republish-outstanding-events-on-restart=true
spring.modulith.events.staleness.check-interval=30s
spring.modulith.events.staleness.resubmitted=5m

Recipes

Add missing @AutoConfigureRestTestClient annotation

io.arconia.rewrite.spring.boot4.AddAutoConfigureRestTestClientAnnotation

Add missing @AutoConfigureRestTestClient annotation to classes annotated with @SpringBootTest or @WebMvcTest that have a RestTestClient injected through a field or a parameter.

Example

Before
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.web.servlet.client.RestTestClient;

@SpringBootTest
class MyControllerTest {
  @Autowired
  private RestTestClient restTestClient;
}
After
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureRestTestClient;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.web.servlet.client.RestTestClient;

@AutoConfigureRestTestClient
@SpringBootTest
class MyControllerTest {
  @Autowired
  private RestTestClient restTestClient;
}

Add missing @AutoConfigureTestRestTemplate annotation

io.arconia.rewrite.spring.boot4.AddAutoConfigureTestRestTemplateAnnotation

Add missing @AutoConfigureTestRestTemplate annotation to classes annotated with @SpringBootTest or @WebMvcTest that have a TestRestTemplate injected through a field or a parameter.

Example

Before
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.resttestclient.TestRestTemplate;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class MyControllerTest {
  @Autowired
  private TestRestTemplate testRestTemplate;
}
After
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.resttestclient.TestRestTemplate;
import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate;
import org.springframework.boot.test.context.SpringBootTest;

@AutoConfigureTestRestTemplate
@SpringBootTest
class MyControllerTest {
  @Autowired
  private TestRestTemplate testRestTemplate;
}

Add missing @AutoConfigureWebTestClient annotation

io.arconia.rewrite.spring.boot4.AddAutoConfigureWebTestClientAnnotation

Add missing @AutoConfigureWebTestClient annotation to classes annotated with @SpringBootTest or @WebMvcTest that have a WebTestClient injected through a field or a parameter.

Example

Before
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.web.reactive.server.WebTestClient;

@SpringBootTest
class MyControllerTest {
  @Autowired
  private WebTestClient webTestClient;
}
After
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.webtestclient.autoconfigure.AutoConfigureWebTestClient;
import org.springframework.test.web.reactive.server.WebTestClient;

@AutoConfigureWebTestClient
@SpringBootTest
class MyControllerTest {
  @Autowired
  private WebTestClient webTestClient;
}

Comment usages of ServerProperties.getForwardHeadersStrategy()

io.arconia.rewrite.spring.boot4.CommentForwardHeadersStrategyGetter

Add a comment above usages of ServerProperties.getForwardHeadersStrategy(), deprecated in Spring Boot 4.2. The getter only reflects the deprecated server.forward-headers-strategy property, so code relying on it does not see a strategy configured with server.request.header.forwarded.strategy.

Use setForwardedRequestHeaders on web server factories

io.arconia.rewrite.spring.boot4.UseForwardedRequestHeaders

Replace the setUseForwardHeaders(boolean) method of the Jetty and Reactor Netty web server factories, deprecated in Spring Boot 4.2, with setForwardedRequestHeaders(ForwardedRequestHeaders). Calls passing an argument that is not a boolean literal are left unchanged.

spring › cloud2025

Composite recipes

Migrate Spring Cloud Contract to 5.0

io.arconia.rewrite.spring.cloud2025.MigrateSpringCloudContract_5_0

Migrate Spring Cloud Contract usages that changed in the 5.0 release shipped with Spring Cloud 2025.1.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

  • Remove annotation attribute (org.openrewrite.java.RemoveAnnotationAttribute)

  • Change type (org.openrewrite.java.ChangeType)

Example

Before
package com.example;

import org.springframework.cloud.contract.wiremock.AutoConfigureWireMock;

@AutoConfigureWireMock(port = 0)
class DemoTests {
}
After
package com.example;

import org.wiremock.spring.EnableWireMock;

@EnableWireMock
class DemoTests {
}

Migrate Spring Cloud Gateway proxy properties to proxy-exchange.webflux

io.arconia.rewrite.spring.cloud2025.MigrateGatewayProxyExchangeWebFluxProperties

Rename spring.cloud.gateway.proxy. keys to spring.cloud.gateway.proxy-exchange.webflux. when the project depends on the Spring WebFlux variant of Spring Cloud Gateway.

Tags: spring, cloud

Recipes applied

Migrate Spring Cloud Gateway proxy properties to proxy-exchange.webmvc

io.arconia.rewrite.spring.cloud2025.MigrateGatewayProxyExchangeWebMvcProperties

Rename spring.cloud.gateway.proxy. keys to spring.cloud.gateway.proxy-exchange.webmvc. when the project depends on the Spring MVC variant of Spring Cloud Gateway.

Tags: spring, cloud

Recipes applied

Migrate Spring Cloud properties to 2025.0

io.arconia.rewrite.spring.cloud2025.UpgradeSpringCloudProperties_2025_0

Migrate Spring Cloud configuration properties that were renamed or deprecated in the 2025.0 release, across YAML and Properties configuration files.

Tags: spring, cloud

Recipes applied

Migrate Spring Cloud properties to 2025.0 (generated)

io.arconia.rewrite.spring.cloud2025.UpgradeSpringCloudPropertiesGenerated_2025_0

Migrate Spring Cloud configuration properties that were renamed or deprecated in the 2025.0 release, across YAML and Properties configuration files.

Tags: spring, cloud

Recipes applied

Migrate Spring Cloud properties to 2025.1

io.arconia.rewrite.spring.cloud2025.UpgradeSpringCloudProperties_2025_1

Migrate Spring Cloud configuration properties that were renamed or deprecated in the 2025.1 release, across YAML and Properties configuration files.

Tags: spring, cloud

Recipes applied

Migrate Spring Cloud properties to 2025.1 (generated)

io.arconia.rewrite.spring.cloud2025.UpgradeSpringCloudPropertiesGenerated_2025_1

Migrate Spring Cloud configuration properties that were renamed or deprecated in the 2025.1 release, across YAML and Properties configuration files.

Tags: spring, cloud

Recipes applied

Migrate to Spring Cloud 2025.0

io.arconia.rewrite.spring.cloud2025.UpgradeSpringCloud_2025_0

Migrate a Spring Boot application to the latest Spring Cloud 2025.0.x release.

Tags: spring, cloud

Recipes applied

Example

Before
plugins {
    id "java-library"
}

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.springframework.cloud:spring-cloud-gateway-server"
    implementation "org.springframework.cloud:spring-cloud-gateway-server-mvc"
    implementation "org.springframework.cloud:spring-cloud-starter-gateway-server"
    implementation "org.springframework.cloud:spring-cloud-starter-gateway-server-mvc"
    implementation "org.springframework.cloud:spring-cloud-gateway-mvc"
    implementation "org.springframework.cloud:spring-cloud-gateway-webflux"
}
After
plugins {
    id "java-library"
}

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.springframework.cloud:spring-cloud-gateway-server-webflux"
    implementation "org.springframework.cloud:spring-cloud-gateway-server-webmvc"
    implementation "org.springframework.cloud:spring-cloud-starter-gateway-server-webflux"
    implementation "org.springframework.cloud:spring-cloud-starter-gateway-server-webmvc"
    implementation "org.springframework.cloud:spring-cloud-gateway-proxyexchange-webmvc"
    implementation "org.springframework.cloud:spring-cloud-gateway-proxyexchange-webflux"
}

Migrate to Spring Cloud 2025.1

io.arconia.rewrite.spring.cloud2025.UpgradeSpringCloud_2025_1

Migrate a Spring Boot application to the latest Spring Cloud 2025.1.x release.

Tags: spring, cloud

Recipes applied

Example

Before
spring.cloud.gateway.server.webflux.metrics.tags.path.enabled=true
After
spring.cloud.gateway.server.webflux.metrics.path-tags.enabled=true

spring › cloud2026

Composite recipes

Migrate Spring Cloud Config to 5.1

io.arconia.rewrite.spring.cloud2026.MigrateSpringCloudConfig_5_1

Migrate Spring Cloud Config usages that changed in the 5.1 release shipped with Spring Cloud 2026.0. Config Client retry moved from Spring Retry to the retry support built into Spring Framework, and it is no longer enabled by having Spring Retry on the classpath. In a module that uses the Config Client and depends on Spring Retry, the recipe sets spring.cloud.config.retry.enabled=true in the configuration files that set spring.cloud.config.fail-fast, so retry stays enabled, and removes the Spring Retry dependency unless the code uses it.

Recipes applied

Example

Before
spring.config.import=configserver:http://localhost:8888
spring.cloud.config.fail-fast=true
spring.cloud.config.retry.max-attempts=10
After
spring.config.import=configserver:http://localhost:8888
spring.cloud.config.fail-fast=true
spring.cloud.config.retry.enabled=true
spring.cloud.config.retry.max-attempts=10
Before
spring:
  cloud:
    config:
      fail-fast: true
      retry:
        max-attempts: 10
---
spring:
  config:
    activate:
      on-profile: local
    import: "optional:configserver:"
After
spring:
  cloud:
    config:
      fail-fast: true
      retry:
        max-attempts: 10
        enabled: true
---
spring:
  config:
    activate:
      on-profile: local
    import: "optional:configserver:"

Migrate Spring Cloud Contract to Stubborn Contract

io.arconia.rewrite.spring.cloud2026.MigrateSpringCloudContractToStubbornContract

Migrate from Spring Cloud Contract, which was archived and is no longer part of the Spring Cloud 2026.0 release train, to Stubborn Contract, its continuation. Moves build coordinates, build plugins, Java packages, configuration property prefixes, and the JUnit 4 stub runner rule to their Stubborn Contract equivalents.

Recipes applied
  • Migrate the stub runner JUnit 4 rule annotation to the JUnit 5 extension annotation (io.arconia.rewrite.spring.cloud2026.MigrateStubRunnerRuleAnnotation)

    • Change type (org.openrewrite.java.ChangeType)

  • Change type (org.openrewrite.java.ChangeType ×2)

  • Rename package name (org.openrewrite.java.ChangePackage ×3)

  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency ×14)

  • Change Maven plugin group and artifact ID (org.openrewrite.maven.ChangePluginGroupIdAndArtifactId)

  • Upgrade Maven plugin version (org.openrewrite.maven.UpgradePluginVersion)

  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency)

  • Change a Gradle plugin (org.openrewrite.gradle.plugins.ChangePlugin)

  • Change property key (org.openrewrite.properties.ChangePropertyKey)

  • Change property key (org.openrewrite.yaml.ChangePropertyKey)

  • Change property key (org.openrewrite.properties.ChangePropertyKey)

  • Change property key (org.openrewrite.yaml.ChangePropertyKey)

Migrate Spring Cloud Gateway to 5.1

io.arconia.rewrite.spring.cloud2026.MigrateSpringCloudGateway_5_1

Migrate Spring Cloud Gateway usages that changed in the 5.1 release shipped with Spring Cloud 2026.0. The retry filter moved from Reactor Addons to the retry support built into Reactor, dropping the basedOnPreviousValue backoff flag.

Recipes applied
  • Delete method argument (org.openrewrite.java.DeleteMethodArgument ×2)

Example

Before
import java.time.Duration;

import org.springframework.cloud.gateway.filter.factory.RetryGatewayFilterFactory;

class Demo {
    RetryGatewayFilterFactory.RetryConfig config = new RetryGatewayFilterFactory.RetryConfig()
            .setBackoff(Duration.ofMillis(10), Duration.ofMillis(50), 2, false);

    RetryGatewayFilterFactory.BackoffConfig backoff =
            new RetryGatewayFilterFactory.BackoffConfig(Duration.ofMillis(10), Duration.ofMillis(50), 2, true);
}
After
import java.time.Duration;

import org.springframework.cloud.gateway.filter.factory.RetryGatewayFilterFactory;

class Demo {
    RetryGatewayFilterFactory.RetryConfig config = new RetryGatewayFilterFactory.RetryConfig()
            .setBackoff(Duration.ofMillis(10), Duration.ofMillis(50), 2);

    RetryGatewayFilterFactory.BackoffConfig backoff =
            new RetryGatewayFilterFactory.BackoffConfig(Duration.ofMillis(10), Duration.ofMillis(50), 2);
}

Migrate Spring Cloud properties to 2026.0

io.arconia.rewrite.spring.cloud2026.UpgradeSpringCloudProperties_2026_0

Migrate Spring Cloud configuration properties that were renamed or deprecated in the 2026.0 release, across YAML and Properties configuration files.

Tags: spring, cloud

Recipes applied

Migrate Spring Cloud properties to 2026.0 (generated)

io.arconia.rewrite.spring.cloud2026.UpgradeSpringCloudPropertiesGenerated_2026_0

Migrate Spring Cloud configuration properties that were renamed or deprecated in the 2026.0 release, across YAML and Properties configuration files.

Tags: spring, cloud

Recipes applied

Migrate the stub runner JUnit 4 rule annotation to the JUnit 5 extension annotation

io.arconia.rewrite.spring.cloud2026.MigrateStubRunnerRuleAnnotation

Replace the @Rule annotation with @RegisterExtension in test classes that use the Spring Cloud Contract stub runner rule, ahead of migrating the rule itself to the Stubborn Contract extension.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType)

Migrate to Spring Cloud 2026.0

io.arconia.rewrite.spring.cloud2026.UpgradeSpringCloud_2026_0

Migrate a Spring Boot application to the latest Spring Cloud 2026.0.x release.

Tags: spring, cloud

Recipes applied

Example

Before
spring.cloud.consul.config.prefix=config
spring.cloud.gateway.server.webflux.metrics.tags.path.enabled=true
After
spring.cloud.consul.config.prefixes=config
spring.cloud.gateway.server.webflux.metrics.path-tags.enabled=true

spring › data2025

Composite recipes

Migrate the Spring Data Commons module to Spring Data 2025.1

io.arconia.rewrite.spring.data2025.MigrateSpringDataCommons_2025_1

Update usages of Spring Data Commons APIs that were removed, relocated, or renamed in the Spring Data 2025.1 release train. The persistence constructor annotation gave way to the persistence creator one, several core types moved to the new core package, and the constructor-oriented mapping metadata methods were renamed to their creator-oriented successors.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType)

  • Change method name (org.openrewrite.java.ChangeMethodName ×5)

  • Change type (org.openrewrite.java.ChangeType ×10)

  • Change method name (org.openrewrite.java.ChangeMethodName ×2)

Migrate the Spring Data JDBC module to Spring Data 2025.1

io.arconia.rewrite.spring.data2025.MigrateSpringDataJdbc_2025_1

Update usages of Spring Data JDBC APIs that were relocated in the Spring Data 2025.1 release train. The query mapping configuration moved to the conversion package.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType)

Migrate the Spring Data JPA module to Spring Data 2025.1

io.arconia.rewrite.spring.data2025.MigrateSpringDataJpa_2025_1

Flag the native query parser property removed in Spring Data JPA 4.0. The query enhancer is now selected through the queryEnhancerSelector attribute of @EnableJpaRepositories.

Recipes applied

Migrate the Spring Data MongoDB module to Spring Data 2025.1

io.arconia.rewrite.spring.data2025.MigrateSpringDataMongoDb_2025_1

Update usages of Spring Data MongoDB APIs that changed in the Spring Data 2025.1 release train. The allowDiskUse attribute of the @Meta annotation changed from a boolean to a string so that the server default can be expressed.

Recipes applied

Migrate the Spring Data for Apache Cassandra module to Spring Data 2025.1

io.arconia.rewrite.spring.data2025.MigrateSpringDataCassandra_2025_1

Update usages of Spring Data for Apache Cassandra APIs that were removed in the Spring Data 2025.1 release train. The legacy asynchronous templates and operations that returned ListenableFuture were replaced by the CompletableFuture based ones, and the deprecated mapping context and session factory beans were replaced by their successors.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×7)

Migrate to Spring Data 2025.1

io.arconia.rewrite.spring.data2025.UpgradeSpringData_2025_1

Migrate a Spring application to the latest Spring Data 2025.1.x release train.

Tags: spring, data

Recipes applied

Example

Before
import org.springframework.data.annotation.PersistenceConstructor;
import org.springframework.data.mapping.PersistentEntity;
import org.springframework.data.mapping.PersistentProperty;
import org.springframework.data.mapping.PersistentPropertyPath;
import org.springframework.data.mapping.PropertyPath;
import org.springframework.data.util.TypeInformation;

class Person {

    @PersistenceConstructor
    Person(String name) {
    }

    PropertyPath path = PropertyPath.from("name", Person.class);
    TypeInformation<Person> type = null;

    boolean creatorArgument(PersistentEntity<?, ?> entity, PersistentProperty<?> property) {
        return entity.isConstructorArgument(property);
    }

    PersistentProperty<?> leaf(PersistentPropertyPath<PersistentProperty<?>> path) {
        return path.getRequiredLeafProperty();
    }
}
After
import org.springframework.data.annotation.PersistenceCreator;
import org.springframework.data.core.PropertyPath;
import org.springframework.data.core.TypeInformation;
import org.springframework.data.mapping.PersistentEntity;
import org.springframework.data.mapping.PersistentProperty;
import org.springframework.data.mapping.PersistentPropertyPath;

class Person {

    @PersistenceCreator
    Person(String name) {
    }

    PropertyPath path = PropertyPath.from("name", Person.class);
    TypeInformation<Person> type = null;

    boolean creatorArgument(PersistentEntity<?, ?> entity, PersistentProperty<?> property) {
        return entity.isCreatorArgument(property);
    }

    PersistentProperty<?> leaf(PersistentPropertyPath<PersistentProperty<?>> path) {
        return path.getLeafProperty();
    }
}

Recipes

Use a string value for the allowDiskUse attribute of @Meta

io.arconia.rewrite.spring.data2025.UseStringValueForMetaAllowDiskUse

Replace boolean allowDiskUse values on the Spring Data MongoDB @Meta annotation with the equivalent string values, since the attribute changed from boolean to String in Spring Data MongoDB 5.0.

spring › data2026

Composite recipes

Migrate to Spring Data 2026.0

io.arconia.rewrite.spring.data2026.UpgradeSpringData_2026_0

Migrate a Spring application to the latest Spring Data 2026.0.x release train.

Tags: spring, data

Recipes applied
  • Upgrade Gradle or Maven dependency versions (org.openrewrite.java.dependencies.UpgradeDependencyVersion ×16)

Migrate to Spring Data 2026.1

io.arconia.rewrite.spring.data2026.UpgradeSpringData_2026_1

Migrate a Spring application to the latest Spring Data 2026.1.x release train.

Tags: spring, data

Recipes applied
  • Upgrade Gradle or Maven dependency versions (org.openrewrite.java.dependencies.UpgradeDependencyVersion ×16)

spring › framework6

Composite recipes

Migrate the Spring Beans module to Spring Framework 6.2

io.arconia.rewrite.spring.framework6.MigrateSpringBeans_6_2

Update usages of Spring Beans APIs that were renamed or replaced in Spring Framework 6.2.

Recipes applied
  • Change method name (org.openrewrite.java.ChangeMethodName)

Migrate the Spring Context module to Spring Framework 6.2

io.arconia.rewrite.spring.framework6.MigrateSpringContext_6_2

Update usages of Spring Context APIs that were renamed or replaced in Spring Framework 6.2.

Recipes applied
  • Change method name (org.openrewrite.java.ChangeMethodName)

Migrate the Spring Messaging module to Spring Framework 6.2

io.arconia.rewrite.spring.framework6.MigrateSpringMessaging_6_2

Update usages of Spring Messaging APIs that were renamed or replaced in Spring Framework 6.2.

Recipes applied
  • Change method name (org.openrewrite.java.ChangeMethodName ×6)

Migrate the Spring Test module to Spring Framework 6.2

io.arconia.rewrite.spring.framework6.MigrateSpringTest_6_2

Update usages of Spring Test APIs that were renamed or replaced in Spring Framework 6.2.

Recipes applied
  • Change method name (org.openrewrite.java.ChangeMethodName ×6)

Migrate the Spring Web MVC module to Spring Framework 6.2

io.arconia.rewrite.spring.framework6.MigrateSpringWebMvc_6_2

Update usages of Spring Web MVC APIs that were renamed or replaced in Spring Framework 6.2.

Recipes applied
  • Change method name (org.openrewrite.java.ChangeMethodName ×9)

Migrate the Spring Web module to Spring Framework 6.2

io.arconia.rewrite.spring.framework6.MigrateSpringWeb_6_2

Update usages of Spring Web APIs that were renamed or replaced in Spring Framework 6.2.

Recipes applied
  • Change method name (org.openrewrite.java.ChangeMethodName ×13)

  • Replace constant with another constant (org.openrewrite.java.ReplaceConstantWithAnotherConstant ×11)

Migrate the Spring WebFlux module to Spring Framework 6.2

io.arconia.rewrite.spring.framework6.MigrateSpringWebFlux_6_2

Update usages of Spring WebFlux APIs that were renamed or replaced in Spring Framework 6.2.

Recipes applied
  • Change method name (org.openrewrite.java.ChangeMethodName ×14)

Migrate the Spring WebSocket module to Spring Framework 6.2

io.arconia.rewrite.spring.framework6.MigrateSpringWebSocket_6_2

Update usages of Spring WebSocket APIs that were renamed or replaced in Spring Framework 6.2.

Recipes applied
  • Change method name (org.openrewrite.java.ChangeMethodName ×7)

Migrate to Spring Framework 6.2

io.arconia.rewrite.spring.framework6.UpgradeSpringFramework_6_2

Migrate a Spring application to the latest Spring Framework 6.2.x release.

Tags: spring, framework

Recipes applied

spring › framework7

Composite recipes

Migrate Spring Retry to the Spring Framework retry support

io.arconia.rewrite.spring.framework7.MigrateSpringRetryToSpringFramework

Migrate annotation-based Spring Retry usage to the retry support built into Spring Framework 7.0, which succeeds Spring Retry. The recipe replaces @EnableRetry with @EnableResilientMethods and the Spring Retry @Retryable with the Spring Framework one, carrying over the exception types, the number of attempts, and the backoff, and removes the Spring Retry dependency. It migrates a project only when every Spring Retry usage in it has a Spring Framework equivalent, and otherwise leaves the project unchanged, so it is never left half migrated. In a multi-module build, each module is checked on its own. A project that uses RetryTemplate or another Spring Retry API, recovery, stateful retry, listeners, SpEL expressions, a random backoff, or retries a method with a reactive return type is therefore left unchanged. The Spring Retry dependency is kept in a project that uses Spring Cloud, where it enables retry features such as load-balanced and OpenFeign client retry and Config Client, Consul, and Kubernetes config retry.

Tags: spring, framework

Recipes applied

Example

Before
import org.springframework.retry.annotation.EnableRetry;

@EnableRetry
class RetryConfiguration {
}
After
import org.springframework.resilience.annotation.EnableResilientMethods;

@EnableResilientMethods
class RetryConfiguration {
}
Before
import java.io.IOException;

import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;

class NotificationService {
    @Retryable(retryFor = IOException.class, maxAttempts = 5, backoff = @Backoff(delay = 100, multiplier = 2))
    void send() throws IOException {
    }
}
After
import org.springframework.resilience.annotation.Retryable;

import java.io.IOException;

class NotificationService {
    @Retryable(includes = IOException.class, maxRetries = 4, delay = 100, multiplier = 2, maxDelay = 30000)
    void send() throws IOException {
    }
}

Migrate the Spring Core module to Spring Framework 7.0

io.arconia.rewrite.spring.framework7.MigrateSpringCore_7_0

Update usages of Spring Core APIs that were renamed or replaced in Spring Framework 7.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×2)

  • Change method name (org.openrewrite.java.ChangeMethodName)

  • Replace constant with another constant (org.openrewrite.java.ReplaceConstantWithAnotherConstant ×2)

Migrate the Spring Expression module to Spring Framework 7.1

io.arconia.rewrite.spring.framework7.MigrateSpringExpression_7_1

Update usages of Spring Expression APIs that were deprecated or replaced in Spring Framework 7.1.

Recipes applied

Migrate the Spring Test module to Spring Framework 7.0

io.arconia.rewrite.spring.framework7.MigrateSpringTest_7_0

Update usages of Spring Test APIs that were renamed or replaced in Spring Framework 7.0.

Recipes applied
  • Change method name (org.openrewrite.java.ChangeMethodName ×2)

Migrate the Spring Test module to Spring Framework 7.1

io.arconia.rewrite.spring.framework7.MigrateSpringTest_7_1

Update usages of Spring Test APIs that were removed or replaced in Spring Framework 7.1.

Recipes applied

Migrate the Spring Web MVC module to Spring Framework 7.0

io.arconia.rewrite.spring.framework7.MigrateSpringWebMvc_7_0

Update usages of Spring Web MVC APIs that were renamed or replaced in Spring Framework 7.0.

Recipes applied
  • Change method name (org.openrewrite.java.ChangeMethodName ×4)

  • Replace constant with another constant (org.openrewrite.java.ReplaceConstantWithAnotherConstant)

Migrate the Spring Web module to Spring Framework 7.0

io.arconia.rewrite.spring.framework7.MigrateSpringWeb_7_0

Update usages of Spring Web APIs that were renamed or replaced in Spring Framework 7.0.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×2)

  • Change method name (org.openrewrite.java.ChangeMethodName)

  • Replace constant with another constant (org.openrewrite.java.ReplaceConstantWithAnotherConstant ×2)

Migrate the Spring Web module to Spring Framework 7.1

io.arconia.rewrite.spring.framework7.MigrateSpringWeb_7_1

Update usages of Spring Web APIs that were deprecated or replaced in Spring Framework 7.1. The forwarded-header filter and transformer are switched to the explicit constructor that selects the "X-Forwarded" header family, matching the Spring Boot default. A comment above each replacement describes what is no longer read, since applications relying on the standard "Forwarded" header or on "X-Forwarded-Prefix" need to adjust the result.

Recipes applied

Migrate the Spring WebFlux module to Spring Framework 7.0

io.arconia.rewrite.spring.framework7.MigrateSpringWebFlux_7_0

Update usages of Spring WebFlux APIs that were renamed or replaced in Spring Framework 7.0.

Recipes applied
  • Change method name (org.openrewrite.java.ChangeMethodName ×5)

  • Change type (org.openrewrite.java.ChangeType)

Migrate to Spring Framework 7.0

io.arconia.rewrite.spring.framework7.UpgradeSpringFramework_7_0

Migrate a Spring application to the latest Spring Framework 7.0.x release.

Tags: spring, framework

Recipes applied
  • Upgrade Gradle or Maven dependency versions (org.openrewrite.java.dependencies.UpgradeDependencyVersion)

  • Migrates from Jackson 2.x to Jackson 3.x (org.openrewrite.java.jackson.UpgradeJackson_2_3)

    • Migrate from Jackson Codehaus (legacy) to Jackson FasterXML (org.openrewrite.java.jackson.CodehausToFasterXML)

      • Transfer @JsonSerialize arguments from Codehaus to FasterXML (org.openrewrite.java.jackson.codehaus.TransferJsonSerializeArgumentsFromCodehausToFasterXML)

      • Migrate classes from Jackson Codehaus (legacy) to Jackson FasterXML (org.openrewrite.java.jackson.CodehausClassesToFasterXML)

      • Migrate dependencies from Jackson Codehaus (legacy) to FasterXML (org.openrewrite.java.jackson.codehaus.CodehausDependencyToFasterXML)

    • Replace IOException with JacksonException in catch clauses (org.openrewrite.java.jackson.IOExceptionToJacksonException)

    • Replace throw new IOException(..) inside Jackson serializer / deserializer overrides (org.openrewrite.java.jackson.ReplaceIOExceptionThrowInJacksonOverrides)

      • Remove elements from a method declaration throws clause (org.openrewrite.java.RemoveMethodThrows ×2)

    • Replace null type in StdDeserializer constructor with actual type (org.openrewrite.java.jackson.StdDeserializerNullConstructor)

    • Use DeserializationContext.readTreeAsValue() instead of ObjectCodec.treeToValue() (org.openrewrite.java.jackson.UseReadTreeAsValueInDeserializer)

    • Update lombok.config for Jackson 3 compatibility (org.openrewrite.java.jackson.LombokJacksonizedConfig)

    • Use format alignment ObjectMappers (org.openrewrite.java.jackson.UseFormatAlignedObjectMappers)

    • Modernize legacy jackson-core feature constants (org.openrewrite.java.jackson.UpgradeJackson_2_3_ModernizeJacksonCoreFeatures)

      • Replace constant with another constant (org.openrewrite.java.ReplaceConstantWithAnotherConstant ×34)

    • Remove redundant Jackson 3 feature flag configurations (org.openrewrite.java.jackson.UpgradeJackson_2_3_RemoveRedundantFeatureFlags)

      • Remove redundant Jackson 3 feature flag configurations (org.openrewrite.java.jackson.RemoveRedundantFeatureFlags ×20)

    • Remove registrations of modules built-in to Jackson 3 (org.openrewrite.java.jackson.RemoveBuiltInModuleRegistrations)

    • Migrate mapper setter calls to builder pattern (org.openrewrite.java.jackson.MigrateMapperSettersToBuilder)

    • Migrate factory setter calls to builder pattern (org.openrewrite.java.jackson.MigrateFactorySettersToBuilder)

    • Update configuration of serialization inclusion in ObjectMapper for Jackson 3 (org.openrewrite.java.jackson.UpdateSerializationInclusionConfiguration)

    • Replace disable(MapperFeature.AUTO_DETECT_*) with changeDefaultVisibility() for Jackson 3 (org.openrewrite.java.jackson.UpdateAutoDetectVisibilityConfiguration)

    • Reorder method arguments (org.openrewrite.java.ReorderMethodArguments ×3)

    • Add missing Jackson dataformat dependencies (org.openrewrite.java.jackson.AddMissingJacksonDependencies)

      • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency ×8)

    • Upgrade Jackson 2.x dependencies to 3.x (org.openrewrite.java.jackson.UpgradeJackson_2_3_Dependencies)

      • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency ×26)

      • Upgrade Gradle or Maven dependency versions (org.openrewrite.java.dependencies.UpgradeDependencyVersion ×2)

    • Rename Jackson 2.x methods to 3.x equivalents (org.openrewrite.java.jackson.UpgradeJackson_2_3_MethodRenames)

      • Rename Jackson 2.x methods to 3.x equivalents for JsonGenerator (org.openrewrite.java.jackson.UpgradeJackson_2_3_JsonGeneratorMethodRenames)

      • Rename Jackson 2.x methods to 3.x equivalents for JsonParser (org.openrewrite.java.jackson.UpgradeJackson_2_3_JsonParserMethodRenames)

      • Rename Jackson 2.x methods to 3.x equivalents for JsonNode (org.openrewrite.java.jackson.UpgradeJackson_2_3_JsonNodeMethodRenames)

      • Rename Jackson 2.x methods to 3.x equivalents for ObjectNode (org.openrewrite.java.jackson.UpgradeJackson_2_3_ObjectNodeMethodRenames)

      • Change method name (org.openrewrite.java.ChangeMethodName ×4)

    • Migrate relocated feature constants to DateTimeFeature and EnumFeature (org.openrewrite.java.jackson.UpgradeJackson_2_3_RelocatedFeatureConstants)

      • Replace constant with another constant (org.openrewrite.java.ReplaceConstantWithAnotherConstant ×21)

    • Replace constant with another constant (org.openrewrite.java.ReplaceConstantWithAnotherConstant)

    • … and 16 more

  • Migrate to JUnit 6.x (io.arconia.rewrite.testing.junit.UpgradeJUnit_6)

    • Add Gradle dependency (org.openrewrite.gradle.AddDependency)

    • Remove a Gradle or Maven dependency (org.openrewrite.java.dependencies.RemoveDependency ×4)

    • Upgrade Gradle or Maven dependency versions (org.openrewrite.java.dependencies.UpgradeDependencyVersion ×2)

    • Upgrade Maven plugin version (org.openrewrite.maven.UpgradePluginVersion ×2)

    • Change type (org.openrewrite.java.ChangeType ×2)

    • Remove annotation (org.openrewrite.java.RemoveAnnotation)

    • Remove annotation attribute (org.openrewrite.java.RemoveAnnotationAttribute)

    • Delete property by key (org.openrewrite.properties.DeleteProperty ×2)

    • Change method name (org.openrewrite.java.ChangeMethodName ×3)

  • Migrate the Spring Core module to Spring Framework 7.0 (io.arconia.rewrite.spring.framework7.MigrateSpringCore_7_0)

    • Change type (org.openrewrite.java.ChangeType ×2)

    • Change method name (org.openrewrite.java.ChangeMethodName)

    • Replace constant with another constant (org.openrewrite.java.ReplaceConstantWithAnotherConstant ×2)

  • Migrate the Spring Test module to Spring Framework 7.0 (io.arconia.rewrite.spring.framework7.MigrateSpringTest_7_0)

    • Change method name (org.openrewrite.java.ChangeMethodName ×2)

  • Migrate the Spring Web module to Spring Framework 7.0 (io.arconia.rewrite.spring.framework7.MigrateSpringWeb_7_0)

    • Change type (org.openrewrite.java.ChangeType ×2)

    • Change method name (org.openrewrite.java.ChangeMethodName)

    • Replace constant with another constant (org.openrewrite.java.ReplaceConstantWithAnotherConstant ×2)

  • Migrate the Spring WebFlux module to Spring Framework 7.0 (io.arconia.rewrite.spring.framework7.MigrateSpringWebFlux_7_0)

    • Change method name (org.openrewrite.java.ChangeMethodName ×5)

    • Change type (org.openrewrite.java.ChangeType)

  • Migrate the Spring Web MVC module to Spring Framework 7.0 (io.arconia.rewrite.spring.framework7.MigrateSpringWebMvc_7_0)

    • Change method name (org.openrewrite.java.ChangeMethodName ×4)

    • Replace constant with another constant (org.openrewrite.java.ReplaceConstantWithAnotherConstant)

  • Migrate Spring Retry to the Spring Framework retry support (io.arconia.rewrite.spring.framework7.MigrateSpringRetryToSpringFramework)

Migrate to Spring Framework 7.1

io.arconia.rewrite.spring.framework7.UpgradeSpringFramework_7_1

Migrate a Spring application to the latest Spring Framework 7.1.x release.

Tags: spring, framework

Recipes applied

Example

Before
import org.springframework.web.filter.ForwardedHeaderFilter;
import org.springframework.web.server.adapter.ForwardedHeaderTransformer;

class Demo {
    ForwardedHeaderFilter filter() {
        return new ForwardedHeaderFilter();
    }

    ForwardedHeaderTransformer transformer() {
        return new ForwardedHeaderTransformer();
    }
}
After
import org.springframework.web.filter.ForwardedHeaderFilter;
import org.springframework.web.server.adapter.ForwardedHeaderTransformer;

class Demo {
    ForwardedHeaderFilter filter() {
        // Only the X-Forwarded headers are read, and X-Forwarded-Prefix is ignored. Pass true to read the Forwarded header instead. Call setUseForwardedPrefix(true) to use the prefix.
        return new ForwardedHeaderFilter(false);
    }

    ForwardedHeaderTransformer transformer() {
        // Only the X-Forwarded headers are read, and X-Forwarded-Prefix is ignored. Pass true to read the Forwarded header instead. Call setUseForwardedPrefix(true) to use the prefix.
        return new ForwardedHeaderTransformer(false);
    }
}

Remove the Spring Retry dependency

io.arconia.rewrite.spring.framework7.RemoveSpringRetryDependency

Remove the Spring Retry dependency from a project that does not use Spring Cloud, where Spring Retry on the classpath enables retry features such as load-balanced and OpenFeign client retry and Config Client, Consul, and Kubernetes config retry.

Recipes applied
  • Remove a Gradle or Maven dependency (org.openrewrite.java.dependencies.RemoveDependency)

Recipes

Find projects whose Spring Retry usage can be migrated to Spring Framework

io.arconia.rewrite.spring.framework7.FindMigratableSpringRetry

Find the source files of a project that uses Spring Retry only through @EnableRetry and @Retryable annotations that map one to one onto the retry support built into Spring Framework. A project that uses another Spring Retry API, recovery, stateful retry, listeners, SpEL expressions, a random backoff, or retries a method with a reactive return type does not qualify.

Use the Spring Framework @Retryable annotation instead of the Spring Retry one

io.arconia.rewrite.spring.framework7.UseSpringFrameworkRetryable

Replace the Spring Retry @Retryable annotation with the Spring Framework @Retryable annotation, carrying over the exception types, the number of attempts, and the backoff, so that methods retry the same way. Spring Retry counts the initial invocation in maxAttempts, while Spring Framework counts only the retries in maxRetries. Annotations that use recovery, stateful retry, listeners, SpEL expressions, or a random backoff, or that apply to a method with a reactive return type, are left unchanged.

Use the JsonConverterDelegate factory method

io.arconia.rewrite.spring.framework7.UseJsonConverterDelegateFactory

Replace the HttpMessageContentConverter.of(..) factory methods, removed in Spring Framework 7.1, with JsonConverterDelegate.of(Iterable), collecting converters passed individually with List.of(..).

Use the SpelParserConfiguration builder

io.arconia.rewrite.spring.framework7.UseSpelParserConfigurationBuilder

Replace the SpelParserConfiguration constructors, deprecated in Spring Framework 7.1, with SpelParserConfiguration.withDefaults() or the builder API, setting each constructor argument through its named builder method. Constructor calls whose auto-grow flags are not literals are left unchanged.

Use the explicit constructors of ForwardedHeaderFilter and ForwardedHeaderTransformer

io.arconia.rewrite.spring.framework7.UseExplicitForwardedHeaderConstructors

Replace the no-argument constructors of ForwardedHeaderFilter and ForwardedHeaderTransformer, deprecated in Spring Framework 7.1, with the constructor that selects the X-Forwarded header family, matching the Spring Boot default. The deprecated constructors also read the standard Forwarded header and used the X-Forwarded-Prefix header, so a comment above each replacement describes what is no longer read.

spring › modulith2

Composite recipes

Migrate Spring Modulith IncompleteEventPublications to FailedEventPublications

io.arconia.rewrite.spring.modulith2.MigrateSpringModulithIncompleteEventPublications_2_2

Migrate usages of IncompleteEventPublications, deprecated in Spring Modulith 2.2, to FailedEventPublications, replacing resubmitIncompletePublications(ResubmissionOptions) with resubmit(ResubmissionOptions). It migrates a project only when every IncompleteEventPublications usage in it has a FailedEventPublications equivalent, and otherwise leaves the project unchanged, so it is never left half migrated. In a multi-module build, each module is checked on its own. A project that calls the overloads taking a Predicate or a Duration, which resubmit every incomplete publication rather than only the failed ones, or that implements IncompleteEventPublications, is therefore left unchanged.

Tags: spring, modulith

Recipes applied
  • Change method name (org.openrewrite.java.ChangeMethodName)

  • Change type (org.openrewrite.java.ChangeType)

Example

Before
import org.springframework.modulith.events.IncompleteEventPublications;
import org.springframework.modulith.events.ResubmissionOptions;

class Resubmitter {
    private final IncompleteEventPublications publications;

    Resubmitter(IncompleteEventPublications publications) {
        this.publications = publications;
    }

    void resubmit() {
        publications.resubmitIncompletePublications(ResubmissionOptions.defaults());
    }
}
After
import org.springframework.modulith.events.FailedEventPublications;
import org.springframework.modulith.events.ResubmissionOptions;

class Resubmitter {
    private final FailedEventPublications publications;

    Resubmitter(FailedEventPublications publications) {
        this.publications = publications;
    }

    void resubmit() {
        publications.resubmit(ResubmissionOptions.defaults());
    }
}

Migrate Spring Modulith properties to 2.0

io.arconia.rewrite.spring.modulith2.UpgradeSpringModulithProperties_2_0

Migrate Spring Modulith configuration properties that were renamed or deprecated in the 2.0 release, across YAML and Properties configuration files.

Tags: spring, modulith

Recipes applied

Migrate Spring Modulith properties to 2.0 (generated)

io.arconia.rewrite.spring.modulith2.UpgradeSpringModulithPropertiesGenerated_2_0

Migrate Spring Modulith configuration properties that were renamed or deprecated in the 2.0 release, across YAML and Properties configuration files.

Tags: spring, modulith

Recipes applied

Migrate Spring Modulith properties to 2.1

io.arconia.rewrite.spring.modulith2.UpgradeSpringModulithProperties_2_1

Migrate Spring Modulith configuration properties that were renamed or deprecated in the 2.1 release, across YAML and Properties configuration files.

Tags: spring, modulith

Recipes applied

Migrate Spring Modulith properties to 2.1 (generated)

io.arconia.rewrite.spring.modulith2.UpgradeSpringModulithPropertiesGenerated_2_1

Migrate Spring Modulith configuration properties that were renamed or deprecated in the 2.1 release, across YAML and Properties configuration files.

Tags: spring, modulith

Recipes applied

Migrate Spring Modulith properties to 2.2

io.arconia.rewrite.spring.modulith2.UpgradeSpringModulithProperties_2_2

Migrate Spring Modulith configuration properties that were renamed or deprecated in the 2.2 release, across YAML and Properties configuration files.

Tags: spring, modulith

Recipes applied

Migrate to Spring Modulith 2.0

io.arconia.rewrite.spring.modulith2.UpgradeSpringModulith_2_0

Migrate a Spring Boot application to the latest Spring Modulith 2.0.x release.

Tags: spring, modulith

Recipes applied

Example

Before
spring.modulith.republish-outstanding-events-on-restart=true
spring.modulith.events.staleness.check-intervall=30s
spring.modulith.events.staleness.resubmission=5m
After
spring.modulith.events.republish-outstanding-events-on-restart=true
spring.modulith.events.staleness.check-interval=30s
spring.modulith.events.staleness.resubmitted=5m

Migrate to Spring Modulith 2.1

io.arconia.rewrite.spring.modulith2.UpgradeSpringModulith_2_1

Migrate a Spring Boot application to the latest Spring Modulith 2.1.x release.

Tags: spring, modulith

Recipes applied

Example

Before
plugins {
    id 'java-library'
}

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.springframework.modulith:spring-modulith-observability"
}
After
plugins {
    id 'java-library'
}

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.springframework.modulith:spring-modulith-observability-core"
}

Migrate to Spring Modulith 2.2

io.arconia.rewrite.spring.modulith2.UpgradeSpringModulith_2_2

Migrate a Spring Boot application to the latest Spring Modulith 2.2.x release.

Tags: spring, modulith

Recipes applied

Recipes

Find projects whose Spring Modulith IncompleteEventPublications usages can be migrated

io.arconia.rewrite.spring.modulith2.FindMigratableIncompleteEventPublications

Find the Java source files of a project that uses IncompleteEventPublications only through resubmitIncompletePublications(ResubmissionOptions), which maps one to one onto FailedEventPublications.resubmit(ResubmissionOptions). A project that calls the overloads taking a Predicate or a Duration, or implements IncompleteEventPublications, does not qualify.

Migrate Spring Modulith properties to 2.2 (generated)

io.arconia.rewrite.spring.modulith2.UpgradeSpringModulithPropertiesGenerated_2_2

Migrate Spring Modulith configuration properties that were renamed or deprecated in the 2.2 release, across YAML and Properties configuration files.

Tags: spring, modulith

Use matchingValue to match a Spring Modulith published event against a value

io.arconia.rewrite.spring.modulith2.UsePublishedEventAssertMatchingValue

Replace PublishedEventAssert.matching(Function, Object), deprecated in Spring Modulith 2.1 and removed in 2.2, with matchingValue(Function, Object). Calls passing a Predicate keep using matching.

Example

Before
import org.springframework.modulith.test.PublishedEventsAssert.PublishedEventAssert;

class Demo {
    void verify(PublishedEventAssert<OrderCompleted> event) {
        event.matching(OrderCompleted::orderId, "42");
    }

    record OrderCompleted(String orderId) {
    }
}
After
import org.springframework.modulith.test.PublishedEventsAssert.PublishedEventAssert;

class Demo {
    void verify(PublishedEventAssert<OrderCompleted> event) {
        event.matchingValue(OrderCompleted::orderId, "42");
    }

    record OrderCompleted(String orderId) {
    }
}

spring › security7

Composite recipes

Migrate the Spring Security CAS module to Spring Security 7.0

io.arconia.rewrite.spring.security7.MigrateSpringSecurityCas_7_0

Update usages of Spring Security CAS APIs that were removed in Spring Security 7.0. The service authentication details type moved out of the web package.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType)

Migrate the Spring Security Config module to Spring Security 7.0

io.arconia.rewrite.spring.security7.MigrateSpringSecurityConfig_7_0

Update usages of Spring Security Config APIs that were removed in Spring Security 7.0. The object post processor moved out of the annotation package, and the Spring MVC security annotation was folded into the web security one.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×2)

Migrate the Spring Security Core module to Spring Security 7.0

io.arconia.rewrite.spring.security7.MigrateSpringSecurityCore_7_0

Update usages of Spring Security Core APIs that were renamed or replaced in Spring Security 7.0. The check method of the authorization managers became authorize, and the pre/post template defaults were replaced by the annotation template expression defaults.

Recipes applied
  • Change method name (org.openrewrite.java.ChangeMethodName ×2)

  • Change type (org.openrewrite.java.ChangeType)

Migrate the Spring Security Kerberos extension to Spring Security 7.0

io.arconia.rewrite.spring.security7.MigrateSpringSecurityKerberos_7_0

Move the Spring Security Kerberos artifacts, which became part of Spring Security in the 7.0 release, from the org.springframework.security.kerberos group to the org.springframework.security group. The packages are unchanged.

Recipes applied
  • Change Gradle or Maven dependency (org.openrewrite.java.dependencies.ChangeDependency ×3)

Migrate the Spring Security OAuth2 Client module to Spring Security 7.0

io.arconia.rewrite.spring.security7.MigrateSpringSecurityOAuth2Client_7_0

Replace the token response clients removed in Spring Security 7.0 with their RestClient based successors. Code that customized the removed clients through their request entity converter or RestOperations setters needs to move to the parameters converter and RestClient setters of the new clients. The password grant was removed without replacement.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×5)

Migrate the Spring Security OAuth2 Resource Server module to Spring Security 7.0

io.arconia.rewrite.spring.security7.MigrateSpringSecurityOAuth2ResourceServer_7_0

Update usages of Spring Security OAuth2 Resource Server APIs that were removed in Spring Security 7.0. The bearer token authentication token and filter moved to their authentication subpackages, and the Nimbus opaque token introspectors were replaced by the Spring ones with the same constructors.

Recipes applied
  • Change type (org.openrewrite.java.ChangeType ×4)

Migrate the Spring Security SAML2 Service Provider module to Spring Security 7.0

io.arconia.rewrite.spring.security7.MigrateSpringSecuritySaml2_7_0

Update usages of Spring Security SAML2 APIs that were removed in Spring Security 7.0. The OpenSAML 4 components were removed in favor of the OpenSAML 5 ones, explicitly declared OpenSAML dependencies move to the 5.x line, and the asserting party details accessors were replaced by the asserting party metadata ones.

Recipes applied
  • Upgrade Gradle or Maven dependency versions (org.openrewrite.java.dependencies.UpgradeDependencyVersion)

  • Change type (org.openrewrite.java.ChangeType ×15)

  • Change method name (org.openrewrite.java.ChangeMethodName ×2)

Migrate the Spring Security Web module to Spring Security 7.0

io.arconia.rewrite.spring.security7.MigrateSpringSecurityWeb_7_0

Add the spring-security-webauthn module, which Spring Security 7.0 split out of the web module, to projects that use the WebAuthn support.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency)

Migrate the legacy Spring Security Access API to Spring Security 7.0

io.arconia.rewrite.spring.security7.MigrateSpringSecurityAccess_7_0

Add the spring-security-access module to projects that still use the legacy Access API, such as access decision managers and voters, which Spring Security 7.0 moved out of the core, web, ACL, and messaging modules. The Access API has been deprecated in favor of the Authorization API since Spring Security 5.

Recipes applied
  • Add Gradle or Maven dependency (org.openrewrite.java.dependencies.AddDependency ×15)

Migrate to Spring Security 7.0

io.arconia.rewrite.spring.security7.UpgradeSpringSecurity_7_0

Migrate a Spring application to the latest Spring Security 7.0.x release.

Tags: spring, security

Recipes applied

Example

Before
import java.util.function.Supplier;

import org.springframework.security.authorization.AuthorizationDecision;
import org.springframework.security.authorization.AuthorizationManager;
import org.springframework.security.core.Authentication;

class AlwaysGranted implements AuthorizationManager<Object> {

    @Override
    public AuthorizationDecision check(Supplier<Authentication> authentication, Object object) {
        return new AuthorizationDecision(true);
    }

    AuthorizationDecision delegate(AuthorizationManager<Object> manager, Supplier<Authentication> authentication) {
        return manager.check(authentication, new Object());
    }
}
After
import java.util.function.Supplier;

import org.springframework.security.authorization.AuthorizationDecision;
import org.springframework.security.authorization.AuthorizationManager;
import org.springframework.security.core.Authentication;

class AlwaysGranted implements AuthorizationManager<Object> {

    @Override
    public AuthorizationDecision authorize(Supplier<Authentication> authentication, Object object) {
        return new AuthorizationDecision(true);
    }

    AuthorizationDecision delegate(AuthorizationManager<Object> manager, Supplier<Authentication> authentication) {
        return manager.authorize(authentication, new Object());
    }
}

Migrate to Spring Security 7.1

io.arconia.rewrite.spring.security7.UpgradeSpringSecurity_7_1

Migrate a Spring application to the latest Spring Security 7.1.x release.

Tags: spring, security

Recipes applied
  • Upgrade Gradle or Maven dependency versions (org.openrewrite.java.dependencies.UpgradeDependencyVersion)

Migrate to Spring Security 7.2

io.arconia.rewrite.spring.security7.UpgradeSpringSecurity_7_2

Migrate a Spring application to the latest Spring Security 7.2.x release.

Tags: spring, security

Recipes applied
  • Upgrade Gradle or Maven dependency versions (org.openrewrite.java.dependencies.UpgradeDependencyVersion)

Deprecated recipes

These identifiers remain as aliases that delegate to their replacement and will be removed in a future release.

  • io.arconia.rewrite.spring.ai.UpgradeSpringAi_1_0 — Deprecated. Use io.arconia.rewrite.spring.ai1.UpgradeSpringAi_1_0 instead.

  • io.arconia.rewrite.spring.ai.UpgradeSpringAi_1_1 — Deprecated. Use io.arconia.rewrite.spring.ai1.UpgradeSpringAi_1_1 instead.

  • io.arconia.rewrite.spring.ai.UpgradeSpringAi_2_0 — Deprecated. Use io.arconia.rewrite.spring.ai2.UpgradeSpringAi_2_0 instead.