Is camelCase naming convention failing in returning response, when variable name follows immediate camel casing rule?
示例变量名称,例如tId
、iPhone
、bLaBlAbLa
、testName
.
Steps to replicate issue个
- 创建一个Spring-Boot-starter-web
- 按如下方式创建文件:
TestModel.java
个
package com.test.IssueWithName.model;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public class TestModel {
private int tId;
private String iPhone;
private int bLaBlAbLa;
private String testName;
}
TestController.java
个
package com.test.IssueWithName.controller;
import com.test.IssueWithName.model.TestModel;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class TestController {
@GetMapping("test")
public TestModel responseNamingIssue() {
return new TestModel(1, "15 ultra super duper pro max", 4, "testingNameIssues bla bla");
}
}
IssueWithNameApplication.java
(主班)
package com.test.IssueWithName;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class IssueWithNameApplication {
public static void main(String[] args) {
SpringApplication.run(IssueWithNameApplication.class, args);
}
}
在达到localhost:<port>/test
的同时做出react
{
"testName": "testingNameIssues bla bla",
"tid": 1,
"iphone": "15 ultra super duper pro max",
"blaBlAbLa": 4
}
问题:testName
正确地遵循了camelCase规则,但我猜tId
、iPhone
和bLaBlAbLa
命名变量没有响应camelCase.tId
、iPhone
和bLaBlAbLa
分别变成了tid
、iphone
和blaBlAbLa
.
如果我说错了,请纠正我.谢谢你的阅读.