Commit 2242e541 by yuwei

2.0.0项目初始化

parent 99a7e243
......@@ -15,6 +15,8 @@ import org.springframework.security.web.util.ThrowableAnalyzer;
import org.springframework.stereotype.Component;
import org.springframework.web.HttpRequestMethodNotSupportedException;
import javax.servlet.http.HttpServletResponse;
@Slf4j
@Component
public class DataWebResponseExceptionTranslator implements WebResponseExceptionTranslator<OAuth2Exception> {
......@@ -86,7 +88,7 @@ public class DataWebResponseExceptionTranslator implements WebResponseExceptionT
message = "用户名或密码错误";
}
}
return new ResponseEntity<OAuth2Exception>(new DataOauthException(message), headers, HttpStatus.valueOf(status));
return new ResponseEntity<>(new DataOauthException(message), headers, HttpStatus.valueOf(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
}
public void setThrowableAnalyzer(ThrowableAnalyzer throwableAnalyzer) {
......
......@@ -41,10 +41,5 @@
<artifactId>datax-common-core</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>cn.datax</groupId>
<artifactId>datax-common-dictionary</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package cn.datax.service.codegen.api.vo;
import cn.datax.common.dictionary.annotation.DictAop;
import cn.datax.service.codegen.api.dto.GenColumnDto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
......@@ -23,7 +22,6 @@ public class GenTableVo implements Serializable {
private static final long serialVersionUID=1L;
private String id;
@DictAop(code = "status")
private String status;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime createTime;
......
......@@ -36,7 +36,6 @@ instance.interceptors.response.use(
response => {
loadingInstance.close()
const code = response.data.code || 200
console.log('code:' + code)
if (code === 500) {
// 系统错误
Message.error(response.data.msg || '系统错误')
......@@ -47,7 +46,6 @@ instance.interceptors.response.use(
},
error => {
loadingInstance.close()
console.log('error.response.status:' + error.response.status)
if (error.response.status) {
switch (error.response.status) {
// 401: 未登录
......@@ -83,7 +81,7 @@ instance.interceptors.response.use(
break
// 其他错误,直接抛出错误提示
default:
Message.error(error.response.data.message)
Message.error(error.response.data.msg)
}
}
return Promise.reject(error.response)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment