准备上传
This commit is contained in:
@@ -26,8 +26,17 @@ public class PythonBarcodeAutoStarter implements ApplicationRunner {
|
||||
return;
|
||||
}
|
||||
log.info("启动 Python 条码识别服务...");
|
||||
manager.startIfEnabled();
|
||||
log.info("Python 条码识别服务已就绪");
|
||||
try {
|
||||
manager.startIfEnabled();
|
||||
log.info("Python 条码识别服务已就绪");
|
||||
} catch (RuntimeException ex) {
|
||||
if (properties.isFailOnError()) {
|
||||
// 让应用启动失败,遵循严格模式
|
||||
throw ex;
|
||||
}
|
||||
// 宽松模式:记录错误并允许应用继续启动
|
||||
log.error("Python 条码识别服务启动失败:{}。已忽略错误并继续启动后端(python.barcode.fail-on-error=false)", ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
|
||||
Reference in New Issue
Block a user