[BUG]项目resources下fastjson2.properties 里添加fastjson2.useJacksonAnnotation=false实际不生效
- Dominant language
- Java
- Stars
- 4.4k
- Forks
- 613
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 6
Description
### 问题描述
*简要描述您碰到的问题。*
项目resources下fastjson2.properties 里添加fastjson2.useJacksonAnnotation=false实际不生效
### 环境信息
*请填写以下信息:*
- OS信息: [ openEuler 22.03 LTS SP1 16Core 2.10GHz 128 GB]
- JDK信息: [openjdk version "11.0.28" 2025-07-15]
- 版本信息:[Fastjson2 2.0.63]
### 重现步骤
*如何操作可以重现该问题:*
仅配置fastjson2.properties
```java
//useJacksonAnnotation = getPropertyBool(properties, "fastjson2.useJacksonAnnotation", true);
```
通过代码可以看到,getPropertyBool 先通过System.getProperty(name);获取参数,如果获取不到就直接返回默认值,不会从fastjson2.properties 文件获取配置
### 期待的正确结果
*由于项目是war部署,会存在多个应用,为了不影响其它应用。需要没有系统参数时从fastjson2.properties 获取*
### 相关日志输出
*请复制并粘贴任何相关的日志输出。*
#### 附加信息
*
*
Contributor guide
Research direction
Start by tracing the getPropertyBool call for fastjson2.useJacksonAnnotation and the loading path for fastjson2.properties. Reproduce the case with only the resource configuration and no system property; done means the resource value is honored while an explicitly supplied system property retains its intended precedence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100