javaspringspring-mvcspring-bootproperties-file

SpringBoot unknown property in application.properties


I've generated a Spring Boot web application using Spring Initializr, using embedded Tomcat + Thymeleaf template engine.

I put this property in my application.properties

default.to.address=nunito.calzada@gmail.com

I am using Spring Tool Suite Version: 3.8.4.RELEASE as a development environment, but I got this warning in the Editor 'default.to.address' is an unknown property.

Should I put this property in another property file ?


Solution

  • It's because it's being opened by the STS properties editor which validates properties amongst other things. There's no harm in having it in the application.properties file, you can even add your own meta-data for the property.

    http://docs.spring.io/spring-boot/docs/current/reference/html/configuration-metadata.html