Skip to content

Improve SpringEnvironmentLookup exception to hint that you might need a file ending '-spring' #42339

Closed as not planned
@philwebb

Description

@philwebb

See #42336. We could improve the message or throw a specific exception and have a failure analyzer.

2024-09-17T10:29:21.475587700Z main ERROR Resolver failed to lookup spring:spring.application.name java.lang.IllegalStateException: Unable to obtain Spring Environment from LoggerContext
	at org.springframework.util.Assert.state(Assert.java:76)
	at org.springframework.boot.logging.log4j2.SpringEnvironmentLookup.lookup(SpringEnvironmentLookup.java:46)
	at org.apache.logging.log4j.core.lookup.StrLookup.evaluate(StrLookup.java:108)
	at org.apache.logging.log4j.core.lookup.Interpolator.evaluate(Interpolator.java:197)
	at org.apache.logging.log4j.core.lookup.StrSubstitutor.resolveVariable(StrSubstitutor.java:1227)

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions