Spring-boot: Warn on old properties

Created on 8 Dec 2017  路  6Comments  路  Source: spring-projects/spring-boot

It would be nice if we could warn if old properties are being used.

enhancement

Most helpful comment

No, it's about a project using an old property that we no longer bind. We can detect this since we have metadata for it so we're looking for a way to warn users on startup.

All 6 comments

Is it about using old annotations?

No, it's about a project using an old property that we no longer bind. We can detect this since we have metadata for it so we're looking for a way to warn users on startup.

i wan to pick this task guide me where can i start looking into the code

@Razi007 This one might be a little hard to pick up, it's going to take some thought from our side. If you're interested in contributing something take a look at issues labeled with "status: ideal-for-contribution" as they should be a bit easier to get started with. Thanks!

I've hacked something that requires to read the metadata on startup so it has a dependency on spring-boot-confguration-metadata which itself brings json again.

I didn't bother too much because I didn't expect us to use that directly but this use case requires it. It is not clear where the code would live, having a compile scope dependency on something from spring-boot-tools makes me nervous. We'd also need to shade json so perhaps a dedicated module for this makes sense after all? :(

Discussing this with phil, we'd create a spring-boot-legacy-properties module that can be added to a project. When that's the case, we'd analyse the Environment for deprecated properties.

Was this page helpful?
0 / 5 - 0 ratings