spring boot 運行提示:Process finished with exit code 1
經檢查發現是由於在application.properties配置文件中將某些自定義配置項移除了,但是代碼中沒有刪掉,導致以上錯誤發生。
例如,配置文件中原先存在:
jszs.path=/oracle/grgzpt-test/
代碼中存在以下應用:
@Value("${jszs.path}")
private String jszsPath;
將配置文件中的jszs.path=/oracle/grgzpt-test/配置項刪除,如果此時不移除@Value("${jszs.path}")則運行spring-boot應用會出現以上錯誤信息。