Re-run Spring Boot Configuration Annotation Processor to update generated metadata

前端 未结 7 2297
傲寒
傲寒 2020-12-23 15:41

I\'ve added:


    org.springframework.boot
    spring-boot-configuration-processor         


        
7条回答
  •  悲哀的现实
    2020-12-23 16:02

    Following these instructions worked for me: http://www.mdoninger.de/2015/05/16/completion-for-custom-properties-in-spring-boot.html

    That message about having to Re-run the Annotation Processor is a bit confusing as it appears it stays there all the time even if nothing has changed.

    The key seems to be rebuilding the project after adding the required dependency, or after making any property changes. After doing that and going back to the YAML file, all my properties were now linked to the configuration classes.

    You may need to click the 'Reimport All Maven Projects' button in the Maven pane as well to get the .yaml file view to recognise the links back to the corresponding Java class.

提交回复
热议问题