Skip to content

PROP_UNKNOWN_PROPERTY warning in application.properties  #332

Closed

Description

@01gopal

Provide a way to supress or provide the new properties used by project.
Else the whole application.properties looks very messy with lots of warnings.

eg. : 'myproject.random.key' is an unknown property.(PROP_UNKNOWN_PROPERTY)

Note: spring properties are not showing this warning as they must be defined in Spring Boot Properties Metadata. So there must be some way to create our own project specific medata json for properties to avoid the "PROP_UNKOWN_PROPERTY" warning.

Activity

  1. BoykoAlex commented on Jul 25, 2019

    @BoykoAlex
    Contributor

    Isn't there a "quick fix" available when the cursor is placed on the underlined property key? The "quick fix" (hope it's showing up. Are using Eclipse or VSCode?) proposes to add the unknown property to additional metadata JSON file. Once the property is in that file the warning will be gone.

  2. kdvolder commented on Jul 25, 2019

    @kdvolder
    Member

    There is also a way to create your own boot properties by annotation specific type of Bean with a @ConfigurationProperties. You can read up on that here:

    https://docs.spring.io/spring-boot/docs/current/reference/html/configuration-metadata.html#configuration-metadata-annotation-processor

  3. kdvolder commented on Jul 25, 2019

    @kdvolder
    Member

    Closing the issue as I beleave there are already two different ways (as mentioned above) to explicitly create metadata for your properties so that the editor doesn't complain about them. If this doesn't work for you, please explain why and then we can re-open the ticket if it seems there's an improvement we need to make to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions