Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

0.11.0

Compare
Choose a tag to compare
@spring-builds spring-builds released this 09 Dec 12:18
· 237 commits to main since this release

Upgrading from Spring Native 0.10

  • GraalVM 21.3, Spring Boot 2.6 and Spring Cloud 2021.0 should be used as baselines.
  • Java 8 is not supported anymore on GraalVM side, so it is not supported anymore on Spring Native side as well. But you will likely be able to compile most Java 8 applications with the Java 11 flavor of GraalVM.
  • Please read the updated AOT engine documentation to understand how it behaves.
  • Less hints are now required, for example those with import selector or condition trigger should be updated to use other ones.
  • Hints with a trigger are now taken in account if the specified class is reachable by GraalVM static analysis, not just with a classpath check, except for annotations where the classpath check is still used.
  • Native Build Tools configuration has evolved since the version used in now 0.9.8.
  • Maven plugin now requires <extensions>true</extensions> and a dependency on org.junit.platform:unit-platform-launcher, see this documentation for more details.
  • Gradle plugin is now automatically imported and configured when using the AOT plugin, so by default no need for additional configuration anymore.
  • AccessBits is now deprecated and TypeAccess[] is used instead to specify @TypeHint access.
  • @TypeHint access default is now AUTO_DETECT so field and methods reflection are not configured for classes by default anymore.
  • NativeConfiguration SPI has been reworked to not use anymore the now deprecated TypeSystem.
  • Extension points are now using META-INF/spring.factories instead of service loader to be discovered.
  • ComponentProcessor extension point has been removed and should be replaced by BeanFactoryNativeConfigurationProcessor or BeanNativeConfigurationProcessor.
  • Spring libraries using child application context (like Spring Cloud LoadBalancer) are not supported yet with the new AOT engine.
  • Spring Cloud Bootstrap is no longer supported.
  • FunctionalSpringApplication is no longer supported.
  • While building a project that contains Spring Cloud Config Client, it is necessary to make sure that the configuration data source that it connects to (such as, Spring Cloud Config Server, Consul, Zookeeper, Vault, etc.) is available. For example, if you retrieve configuration data from Spring Cloud Config Server, make sure you have its instance running and available at the port indicated in the Config Client setup. This is necessary because the application context is being optimized at build time and requires the target environment to be resolved.
  • Spring Cloud Function reflection configuration is now inferred so related hints can be removed.
  • Spring AOT is now a forked process, in order to debug it, follow related documentation.

Changelog

In addition to the 0.11.0 changelog below, make sure to check 0.11.0-M1, 0.11.0-M2 and 0.11.0-RC1 ones to get a complete overview of the changes since Spring Native 0.10.

⭐ New Features

  • Provide implementation of BeanFactoryNativeConfigurationProcessor for function types #1351
  • Provide an SPI to exclude a bean definition to be written #1349
  • Avoid creating reflection entries for java and primitive types. #1346
  • Do not apply AOT plugin on POM projects #1344
  • Use Flag renamed to TypeAccess instead of AccessBits in @TypeHint #1317
  • Add logging to BeanDefinitionRegistrar #1306
  • Use NativeConfigurationRegistry in NativeConfiguration #1279
  • Add support for non Spring Boot tests #1170
  • Restore Spring Integration support #1134
  • Add support for Spring Data MongoDB (lazy loading) DocumentReference annotation. #875

⭐ Compatibility

  • Register reflection configuration for JPA AttributeConverter implementations #1347
  • Method signature types for methods of javax.persistence.AttributeConverter no longer included in configuration. #1329
  • Regression on OAuth2 client and resource server with WebFlux #1291
  • RestController with Annotations at the Service Interface is not working in native Mode #955
  • Infer @AotProxyHint for @Scope beans #928
  • Add preliminary Spring Batch support #203

⭐ Optimizations

🐞 Bug Fixes

  • Wrong test context can be inferred in a native mage leading to a ClassCastException #1353
  • Bean post processors should not be registered at build-time #1345
  • Fix MergedContextConfiguration cache key for runtime contexts #1341
  • Refine HateoasHints to generate a more focused reflection configuration #1340
  • Prevent printing "AOT mode disabled" during test code generation #1332
  • Missing hint for org.hibernate.cfg.beanvalidation.TypeSafeActivator #1331
  • Spring Data Repository with unresolved generics cannot be injected anymore #1324
  • StackOverflow in ProtectedAccessAnalyzer.analyze(...) #1323
  • Populate properly AotOptions in GenerateTestBootstrapCommand #1321
  • Only @Component are considered for method security processing #1314
  • AOT test code gen fails when same name test classes exist in different package #1313
  • Generate Avro types for all @KafkaListener-annotated beans #1310
  • Only @Component are considered for JPA configuration processing #1297
  • Fail to inject to a parameterized type with FactoryBean #1292
  • Adding two methods with the same name lead to duplicated method names in generated code #1266
  • Regex characters are not escaped properly for pattern resources #1193

📔 Documentation

  • Add Javadoc for classes used for adding native configurations #1361
  • Revisit Spring AOT section #1358
  • Update documentation for Bellsoft Liberica NIK usage #1357
  • Refine Logback XML support documentation #1303
  • Update support section of the reference guide #1287

🔨 Dependency Upgrades

  • Upgrade to Native Build Tools 0.9.8 #1290
  • Upgrade to Spring Boot 2.6.1 #1301
  • Upgrade to Spring Cloud 2021.0.0 #1342

❤️ Contributors

We'd like to thank all the contributors who worked on this release!