Skip to content

IllegalStateException: No API version attribute #35236

@rstoyanchev

Description

@rstoyanchev

When versionRequired is false and defaultVersion is not set, an IllegalStateException occurs if the selected endpoint has a version attribute.

Caused by: java.lang.IllegalStateException: No API version attribute
	at org.springframework.util.Assert.state(Assert.java:80)
	at org.springframework.web.servlet.mvc.condition.VersionRequestCondition.handleMatch(VersionRequestCondition.java:151)
	at org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping.handleMatch(RequestMappingInfoHandlerMapping.java:134)
	at org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping.handleMatch(RequestMappingInfoHandlerMapping.java:68)
	at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.lookupHandlerMethod(AbstractHandlerMethodMapping.java:430)
	at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:376)
	at org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping.getHandlerInternal(RequestMappingInfoHandlerMapping.java:116)
	at org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping.getHandlerInternal(RequestMappingInfoHandlerMapping.java:68)

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions