我正在尝试使用 GIT 来跟踪对相当大的 XML 文件(大约 3 Mb)的更改。该文件采用 UTF-8 格式,以 CRLF 行结尾(我在 Windows 10 中工作)。但由于某种原因,GIT 一直认为它是二进制文件,并且不显示任何差异。或者只是无法检测到变化。
Sourcetree 中的差异显示消息“未检测到此文件中的任何更改,或者它是一个二进制文件”
我尝试在.gitattributes中显式设置属性,但似乎这不是原因:
*.xml crlf diff
Run Code Online (Sandbox Code Playgroud)
git check-attr --all -- sorkin.xml
sorkin.xml: diff: set
sorkin.xml: crlf: set
Run Code Online (Sandbox Code Playgroud)
我发现当我将大文件切成三个较小的部分(小于 1 Mb)时,GIT 会正确显示它们的更改。
计算 diff 时,GIT 对文件大小有限制吗?
我为我的 spring-boot 项目创建了一个带有配置属性的简单类。一切都像一个魅力(spring-boot 捕获选项),除了 Eclipse 不将新属性识别为application.yml中的有效选项并将其突出显示为未知这一事实之外。
这是课程:
@Component
@ConfigurationProperties(prefix="server")
public class ServerProperties {
private Integer delay;
private DataAdapter dataAdapter = new DataAdapter();
// setters and getters were cut out for the sake of readability
public static class DataAdapter {
private String baseUrl;
private String targetCode;
// setters and getters
}
}
Run Code Online (Sandbox Code Playgroud)
自动补全不适用于以下属性:

我按照Spring.io 参考中的建议将 Spring Boot 配置处理器的依赖项添加到pom.xml中,但它没有按预期工作。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
Run Code Online (Sandbox Code Playgroud)
尝试切换到application.properties但自动完成功能仍然不起作用。