Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing setter for FormRequestMode in compiled/released JAR #797

Closed
jpmaas opened this issue Aug 3, 2020 · 3 comments · Fixed by #798
Closed

Missing setter for FormRequestMode in compiled/released JAR #797

jpmaas opened this issue Aug 3, 2020 · 3 comments · Fixed by #798
Labels

Comments

@jpmaas
Copy link
Contributor

jpmaas commented Aug 3, 2020

Description

I upgraded the dependency logbook-spring-boot-starter to the latest version (2.1.2). When I wanted to set the formRequestMode via logbook.filter.form-request-mode, I was greeted with the following message on startup:

***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to bind properties under 'logbook.filter' to org.zalando.logbook.autoconfigure.LogbookProperties$Filter:

    Property: logbook.filter.form-request-mode
    Value: parameter
    Origin: class path resource [application.yml]:76:29
    Reason: No setter found for property: form-request-mode

I was a little confused since the code contains a @Setter lombok annotation. But checking the decompiled class code shows the following:

public final class LogbookProperties {

[...]

    public static class Filter {
        private final FormRequestMode formRequestMode = FormRequestMode.fromProperties();

        public Filter() {
        }

        @Generated
        public FormRequestMode getFormRequestMode() {
            return this.formRequestMode;
        }
    }
}

Turns out, the setter is actually missing.

Expected Behavior

  • Lombok setter annotation is processed correctly
  • configuration works as intended

Actual Behavior

  • configuring the form-request-mode results in the application not starting up.

Possible Fix

Remove final from the respective variable.

Steps to Reproduce

  1. Use dependency of logbook-spring-boot-starter in version 2.1.2
  2. Configure logbook.filter.form-request-mode
  3. Try to start spring boot application.
  4. Application does not start.

Your Environment

  • Version used: 2.1.2
@jpmaas
Copy link
Contributor Author

jpmaas commented Aug 3, 2020

Appended a PR for the fix. Feel free to merge.

@whiskeysierra
Copy link
Collaborator

Appended a PR for the fix. Feel free to merge.

PR is in the wrong repo. Happy to merge if you open it here 😉

@jpmaas
Copy link
Contributor Author

jpmaas commented Aug 3, 2020

Should be correct now, used to old bitbucket UI and github confused me with its defaults :D

whiskeysierra pushed a commit that referenced this issue Aug 3, 2020
Remove final from formRequestMode property. Fixes #797
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants