|
@@ -33,6 +33,7 @@ import cn.com.qmth.examcloud.commons.base.logging.ExamCloudLogFactory;
|
|
import cn.com.qmth.examcloud.commons.base.logging.SLF4JImpl;
|
|
import cn.com.qmth.examcloud.commons.base.logging.SLF4JImpl;
|
|
import cn.com.qmth.examcloud.commons.web.redis.RedisClient;
|
|
import cn.com.qmth.examcloud.commons.web.redis.RedisClient;
|
|
import cn.com.qmth.examcloud.commons.web.redis.RedisClientImpl;
|
|
import cn.com.qmth.examcloud.commons.web.redis.RedisClientImpl;
|
|
|
|
+import cn.com.qmth.examcloud.commons.web.support.CustomResponseErrorHandler;
|
|
|
|
|
|
@ComponentScan(basePackages = {"com.qmth.commons", "cn.com.qmth"})
|
|
@ComponentScan(basePackages = {"com.qmth.commons", "cn.com.qmth"})
|
|
@EntityScan(basePackages = {"com.qmth.commons", "cn.com.qmth"})
|
|
@EntityScan(basePackages = {"com.qmth.commons", "cn.com.qmth"})
|
|
@@ -59,7 +60,9 @@ public class CoreBasicApp {
|
|
@Bean
|
|
@Bean
|
|
@LoadBalanced
|
|
@LoadBalanced
|
|
public RestTemplate restTemplate() {
|
|
public RestTemplate restTemplate() {
|
|
- return new RestTemplate();
|
|
|
|
|
|
+ RestTemplate restTemplate = new RestTemplate();
|
|
|
|
+ restTemplate.setErrorHandler(new CustomResponseErrorHandler());
|
|
|
|
+ return restTemplate;
|
|
}
|
|
}
|
|
|
|
|
|
@Bean
|
|
@Bean
|