| | |
| | | File jarFile = applicationHome.getDir(); |
| | | //在jar包所在目录下生成一个upload文件夹用来存储上传的图片 |
| | | |
| | | /**文档存储路径*/ |
| | | String baseDirPath; |
| | | |
| | | /**统一图片上传路径格式*/ |
| | | String baseDirPath2;//人脸上传地址 |
| | | |
| | | if(YamlProperties.runModel == 1) { |
| | | //开发路径 |
| | | baseDirPath = jarFile.getParentFile().toString()+File.separator+"doc_file"+File.separator; |
| | | baseDirPath2 = jarFile.getParentFile().toString()+File.separator+"face"+File.separator; |
| | | }else { |
| | | //打包路径 |
| | | baseDirPath = jarFile.toString()+File.separator+"doc_file"+File.separator; |
| | | baseDirPath2 = jarFile.toString()+File.separator+"face"+File.separator; |
| | | } |
| | | registry.addResourceHandler("/doc_file/**").addResourceLocations("file:/"+baseDirPath); |
| | | registry.addResourceHandler("/face/**").addResourceLocations("file:/"+baseDirPath2); |
| | | |
| | | super.addResourceHandlers(registry); |