项目在eclipse运行是可以的,但是打成war包到线上报错: FileNotFoundException: class path resource [static/apiclient_cert.p12] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:/home/****-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/s
使用的是 idea - Lifecycle-package 的方式打包(maven) 确认 <packaging>war</packaging> 修改启动类: (原启动类) public class ExampleApplication { public static void main(String[] args) { SpringApplication.run(ExampleApplication.class, args); } } 修改为: public class Exa