Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
gogirl-miniapp-backend
Commits
063147f1
Commit
063147f1
authored
Mar 13, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
1e289510
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
GlobalCorsConfig.java
...va/com/gogirl/infrastructure/config/GlobalCorsConfig.java
+1
-0
XcxController.java
src/main/java/com/gogirl/interfaces/xcx/XcxController.java
+3
-3
No files found.
src/main/java/com/gogirl/infrastructure/config/GlobalCorsConfig.java
View file @
063147f1
...
@@ -23,6 +23,7 @@ public class GlobalCorsConfig {
...
@@ -23,6 +23,7 @@ public class GlobalCorsConfig {
config
.
addAllowedMethod
(
"*"
);
config
.
addAllowedMethod
(
"*"
);
//放行哪些原始域(头部信息)
//放行哪些原始域(头部信息)
config
.
addAllowedHeader
(
"*"
);
config
.
addAllowedHeader
(
"*"
);
config
.
setMaxAge
(
3600L
);
//暴露哪些头部信息(因为跨域访问默认不能获取全部头部信息)
//暴露哪些头部信息(因为跨域访问默认不能获取全部头部信息)
// config.addExposedHeader("*");
// config.addExposedHeader("*");
config
.
addExposedHeader
(
"Content-Type"
);
config
.
addExposedHeader
(
"Content-Type"
);
...
...
src/main/java/com/gogirl/interfaces/xcx/XcxController.java
View file @
063147f1
...
@@ -135,9 +135,9 @@ public class XcxController {
...
@@ -135,9 +135,9 @@ public class XcxController {
}
}
@ApiOperation
(
value
=
"图片上传"
)
@ApiOperation
(
value
=
"图片上传"
)
@
Po
stMapping
(
"/technician/xcx/upload"
)
@
Reque
stMapping
(
"/technician/xcx/upload"
)
public
JsonResult
<
String
>
techUpload
(
MultipartFile
file
)
throws
Exception
{
public
JsonResult
<
String
>
techUpload
(
MultipartFile
file
)
throws
Exception
{
String
imgUrl
=
ImageUtil
.
saveImage
(
gogirlProperties
.
getPicturePath
(),
file
);
//
String imgUrl = ImageUtil.saveImage(gogirlProperties.getPicturePath(), file);
return
JsonResult
.
success
(
imgUrl
);
return
JsonResult
.
success
(
"123"
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment