Skip to content

spring-data-commons changed AuditorAware from 1.x to 2.x #613

Closed
@Jenson3210

Description

What problem are you trying to solve?

Migrating between Spring boot 1 and 2, the implementation of AuditorAware changed.

Describe the situation before applying the recipe

see the code

public class AuditorAwareImpl implements AuditorAware<String> {
    public String getCurrentAuditor() {
        return "Some code here";
    }
}

Describe the situation after applying the recipe

see the code

public class AuditorAwareImpl implements AuditorAware<String> {
    public Optional<String> getCurrentAuditor() {
        return Optional.ofNullable("Some code here");
    }
}

Are you interested in contributing this recipe to OpenRewrite?

This should be an easy one. Will see, if no one picks it up sooner.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions