use of com.moon.admin.common.utils.LogAnnotation in project moon by gentoo111.
the class FileController method uploadLayuiFile.
/**
* layui富文本文件自定义上传
*
* @param file
* @param domain
* @return
* @throws IOException
*/
@LogAnnotation
@PostMapping("/layui")
@ApiOperation(value = "layui富文本文件自定义上传")
public LayuiFile uploadLayuiFile(MultipartFile file, String domain) throws IOException {
FileInfo fileInfo = fileService.save(file);
LayuiFile layuiFile = new LayuiFile();
layuiFile.setCode(0);
LayuiFile.LayuiFileData data = new LayuiFile.LayuiFileData();
layuiFile.setData(data);
data.setSrc(domain + "/files" + fileInfo.getUrl());
data.setTitle(file.getOriginalFilename());
return layuiFile;
}
use of com.moon.admin.common.utils.LogAnnotation in project moon by gentoo111.
the class LoginController method restfulLogin.
@LogAnnotation
@ApiOperation(value = "restful登录方式,前后端分离时的接口")
@PostMapping("/sys/login/restful")
public Token restfulLogin(String username, String password) {
UsernamePasswordToken usernamePasswordToken = new UsernamePasswordToken(username, password);
SecurityUtils.getSubject().login(usernamePasswordToken);
return tokenManeger.saveToken(usernamePasswordToken);
}
use of com.moon.admin.common.utils.LogAnnotation in project moon by gentoo111.
the class LoginController method login.
@LogAnnotation
@ApiOperation(value = "web端登陆")
@PostMapping("/sys/login")
public void login(String username, String password) {
UsernamePasswordToken usernamePasswordToken = new UsernamePasswordToken(username, password);
SecurityUtils.getSubject().login(usernamePasswordToken);
}
Aggregations