-
Notifications
You must be signed in to change notification settings - Fork 438
fix: freemarker 生成错误 #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+2
−1
Merged
fix: freemarker 生成错误 #210
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
continew-plugin/continew-plugin-generator/src/main/resources/templates/backend/Menu.ftl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: continew-org/continew-admin
Length of output: 1260
🌐 Web query:
FreeMarker Configuration.getVersion() static method API documentation💡 Result:
Yes, FreeMarker has a static method Configuration.getVersion that returns the Version object representing the FreeMarker version (major.minor.micro numbers and qualifiers). It is documented in the official FreeMarker 2.3.34 JavaDoc. Signature: public static Version getVersion Description: Returns FreeMarker version information, most importantly the major.minor.micro version numbers. Do NOT use this as the value of the incompatible_improvements setting (as the parameter to Configuration(Version)), as then your application can break when you upgrade FreeMarker! Use a constant value, like VERSION_2_3_34, to protect your application from fixes/changes that aren't entirely backward compatible. This method has been present since at least FreeMarker 2.3.20, and is available in the latest version 2.3.34 (as of 2026-04-03). Official documentation: https://freemarker.apache.org/docs/api/freemarker/template/Configuration.html#getVersion Note: There is also a deprecated getVersionNumber that returns a String.
Citations:
使用 FreeMarker 的静态常量而非
Configuration.getVersion()Configuration.getVersion()是有效的静态方法,但根据 FreeMarker 官方文档,不应该将其用作incompatible_improvements设置的值(即DefaultObjectWrapperBuilder的构造参数)。当 FreeMarker 版本升级时,使用运行时版本号会导致应用行为改变。建议改为使用固定的版本常量,如
Configuration.VERSION_2_3_33或对应项目实际使用的 FreeMarker 版本常量,以保护应用免受非完全向后兼容的改变影响。🤖 Prompt for AI Agents