Motivation:
In Spring Boot 3.0, the annotation type org.springframework.boot.context.properties.ConstructorBinding was deprecated in favor of org.springframework.boot.context.properties.bind.ConstructorBinding. In 3.2, the old annotation type was removed.
As of 3.0, a @ConstructorBinding annotation is no longer required/recommended for configuration classes with a single public constructor.
Changes:
Remove generation of @ConstructorBinding annotations in codegen-java and codegen-kotlin.
Result:
Generated code is compatible with Spring Boot 3.x. (Verified with locally updated pkl-spring.)
Generated code is no longer compatible with Spring Boot 2.x. To use Pkl 0.27 and later with Spring Boot 2.x, use Pkl 0.26's code generator.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/apple/pkl/pull/729
**Author:** [@odenix](https://github.com/odenix)
**Created:** 10/23/2024
**Status:** ✅ Merged
**Merged:** 10/25/2024
**Merged by:** [@bioball](https://github.com/bioball)
**Base:** `main` ← **Head:** `codegen-spring-2`
---
### 📝 Commits (1)
- [`6d6b59b`](https://github.com/apple/pkl/commit/6d6b59bb3aa02578362a483a80e4e4c373bb0270) codegen-java/kotlin: Support Spring Boot 3.x instead of 2.x
### 📊 Changes
**4 files changed** (+4 additions, -18 deletions)
<details>
<summary>View changed files</summary>
📝 `pkl-codegen-java/src/main/kotlin/org/pkl/codegen/java/JavaCodeGenerator.kt` (+0 -4)
📝 `pkl-codegen-java/src/test/kotlin/org/pkl/codegen/java/JavaCodeGeneratorTest.kt` (+2 -5)
📝 `pkl-codegen-kotlin/src/main/kotlin/org/pkl/codegen/kotlin/KotlinCodeGenerator.kt` (+0 -4)
📝 `pkl-codegen-kotlin/src/test/kotlin/org/pkl/codegen/kotlin/KotlinCodeGeneratorTest.kt` (+2 -5)
</details>
### 📄 Description
Motivation:
In Spring Boot 3.0, the annotation type `org.springframework.boot.context.properties.ConstructorBinding` was deprecated in favor of `org.springframework.boot.context.properties.bind.ConstructorBinding`. In 3.2, the old annotation type was removed.
As of 3.0, a `@ConstructorBinding` annotation is no longer required/recommended for configuration classes with a single public constructor.
Changes:
Remove generation of `@ConstructorBinding` annotations in codegen-java and codegen-kotlin.
Result:
- Generated code is compatible with Spring Boot 3.x. (Verified with locally updated pkl-spring.)
- Generated code is no longer compatible with Spring Boot 2.x. To use Pkl 0.27 and later with Spring Boot 2.x, use Pkl 0.26's code generator.
- Fixes #139.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/729
Author: @odenix
Created: 10/23/2024
Status: ✅ Merged
Merged: 10/25/2024
Merged by: @bioball
Base:
main← Head:codegen-spring-2📝 Commits (1)
6d6b59bcodegen-java/kotlin: Support Spring Boot 3.x instead of 2.x📊 Changes
4 files changed (+4 additions, -18 deletions)
View changed files
📝
pkl-codegen-java/src/main/kotlin/org/pkl/codegen/java/JavaCodeGenerator.kt(+0 -4)📝
pkl-codegen-java/src/test/kotlin/org/pkl/codegen/java/JavaCodeGeneratorTest.kt(+2 -5)📝
pkl-codegen-kotlin/src/main/kotlin/org/pkl/codegen/kotlin/KotlinCodeGenerator.kt(+0 -4)📝
pkl-codegen-kotlin/src/test/kotlin/org/pkl/codegen/kotlin/KotlinCodeGeneratorTest.kt(+2 -5)📄 Description
Motivation:
In Spring Boot 3.0, the annotation type
org.springframework.boot.context.properties.ConstructorBindingwas deprecated in favor oforg.springframework.boot.context.properties.bind.ConstructorBinding. In 3.2, the old annotation type was removed.As of 3.0, a
@ConstructorBindingannotation is no longer required/recommended for configuration classes with a single public constructor.Changes:
Remove generation of
@ConstructorBindingannotations in codegen-java and codegen-kotlin.Result:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.