文件保存地址
This commit is contained in:
parent
9e91d986e2
commit
70b7f60905
@ -483,6 +483,9 @@ public class HSController {
|
||||
*/
|
||||
@RequestMapping("/showImg/{fileName}")
|
||||
private void responPhoto(HttpServletResponse response, @PathVariable(value = "fileName") String fileName) throws IOException {
|
||||
//Linux环境下的路径
|
||||
// String filePath = filesPath + "/" + fileName;
|
||||
//Window环境下的路径
|
||||
String filePath = filesPath + "\\" + fileName;
|
||||
File imageFile = new File(filePath);
|
||||
if (imageFile.exists()) {
|
||||
|
@ -203,6 +203,9 @@ public class AdminHSServiceImpl implements AdminHSService {
|
||||
@Override
|
||||
public Map<String, Object> deleteRotationPhoto(Map<String, Object> param) {
|
||||
int res = 0;
|
||||
//Linux环境下的路径
|
||||
// File file = new File(filesPath + "/" + param.get("fileEncryption"));
|
||||
//Window环境下的路径
|
||||
File file = new File(filesPath + "\\" + param.get("fileEncryption"));
|
||||
// 路径为文件且不为空则进行删除
|
||||
if (file.isFile() && file.exists()) {
|
||||
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"properties": [
|
||||
{
|
||||
"name": "filePath",
|
||||
"type": "java.lang.String",
|
||||
"description": "Description for filePath."
|
||||
}
|
||||
] }
|
@ -21,4 +21,7 @@ spring:
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
|
||||
##文件保存路径
|
||||
filePath: ${user.dir}\src\main\static\files
|
||||
# Linux环境下
|
||||
filePath: /usr/local/src/phy/file
|
||||
# Window环境下
|
||||
#filePath: ${user.dir}\src\main\static\files
|
||||
|
Loading…
Reference in New Issue
Block a user