- @Data
@Component
@PropertySource(value = “git.properties”,encoding = “UTF-8”)
public class ProjectGitProperties {
@Value("${git.remote.origin.url}")
private String originUrl;
@Value("${git.commit.user.name}")
private String userName;
@Value("${git.commit.message.full}")
private String message;
@Value("${git.commit.id.abbrev}")
private String commitId;
@Value("${git.build.time}")
private String buildTime;
@Value("${git.commit.time}")
private String commitTime;
}