Skip to content

Update to Spring 7 and Spring Boot 4.0.3#810

Merged
sdelamo merged 21 commits into6.0.xfrom
spring-boot-7
Mar 3, 2026
Merged

Update to Spring 7 and Spring Boot 4.0.3#810
sdelamo merged 21 commits into6.0.xfrom
spring-boot-7

Conversation

@sdelamo
Copy link
Contributor

@sdelamo sdelamo commented Mar 3, 2026

No description provided.

ayoube-ait and others added 21 commits February 2, 2026 11:01
In Micronaut 5, DefaultEnvironment is now sealed and cannot be subclassed.
This replaces the previous approach of extending DefaultEnvironment with
the PropertySourcesLocator API, which wraps Spring's property sources as
Micronaut PropertySource instances.

This follows the same pattern used by Micronaut's bootstrap implementation.
- Update generic types to match new API signatures:
  - BeanDefinitionReference<?> -> BeanDefinitionReference<Object>
  - BeanDefinition<?> -> BeanDefinition<Object>
- Fix JSpecify @nonnull annotation placement for qualified type names
- Add error handling for beans with incompatible dependencies (temporary
  workaround for micronaut-views 5.x compiled against Micronaut 4)
- micronaut: 5.0.0-M6 -> 5.0.0-M9
- micronaut-sql: 7.0.0-M4 -> 7.0.0-M5
- micronaut-cache: 6.0.0-M1 -> 6.0.0-M2
Micronaut 5 uses Jackson 3 which moved from com.fasterxml.jackson
to tools.jackson package.
The micronautContext field type changed from DefaultBeanContext to
ApplicationContext for Micronaut 5 compatibility (DefaultEnvironment
is now sealed and requires using the public ApplicationContext API).
- Update micronaut-views version from 5.9.0 to 6.0.0-M1
- Remove ViewsFilter dependency from ModelAndViewServerFilter (class was removed in micronaut-views 6.0.x), use ServerFilterPhase.RENDERING.order() directly which is equivalent to the old ViewsFilter.getOrder()  - Check isPresent() and isEnabled() before calling load() on BeanDefinitionReference.
@sdelamo sdelamo changed the title Spring boot 7 Update to Spring 7 and Spring Boot 4.0.3 Mar 3, 2026
@sdelamo sdelamo requested a review from lissam1 March 3, 2026 11:39
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 3, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
4 New Critical Issues (required ≤ 0)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@sdelamo sdelamo merged commit abd0d48 into 6.0.x Mar 3, 2026
8 of 9 checks passed
@sdelamo sdelamo deleted the spring-boot-7 branch March 3, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants