
spring
fadedsun
从质疑自己,到坚定梦想.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
SpringBoot使用SpringSecurity, web.ignore失效
@Configuration @EnableGlobalMethodSecurity(prePostEnabled=true) public class CustomSecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http.sessionManagement().se原创 2020-10-20 14:32:16 · 2720 阅读 · 1 评论 -
Springboot使用hbase
依赖 gradle引入依赖 // https://mvnrepository.com/artifact/org.apache.hbase/hbase-client compile group: 'org.apache.hbase', name: 'hbase-client', version: '2.3.0' // https://mvnrepository.com/artifact/org.apache.hbase/hbase-server compile group:原创 2020-08-04 10:36:57 · 392 阅读 · 0 评论 -
Springboot 异常处理,实现运行时刷新返回提示语
以下所有代码均是伪代码, 并不保证运行,如果需要完整代码私聊我 异常处理由来 前端给用户显示提示信息 后端记录异常日志,查错,并保证程序正常运行 前端提示信息 前端代码 前端根据后端给的errorCode判断,然后前端给出提示信息 // 发起http请求 result = this.axios.get("xxxx"); // 如果成功直接返回结果 if (result.status == 200) { return result; } // 不成功根据errorCode 弹出提示信息 erro原创 2020-07-26 18:27:46 · 1425 阅读 · 0 评论 -
SpringBoot最简单两步全局结果处理
新建全局处理类 @RestControllerAdvice @Slf4j public class GlobalResultHandler implements ResponseBodyAdvice<Object> { @Override public boolean supports(MethodParameter methodParameter, Class<? extends HttpMessageConverter<?>> converterTy原创 2020-07-22 18:02:19 · 549 阅读 · 0 评论 -
Centos7.3 搭建springboot自动部署环境
1.首先购买一台服务器 2.安装Centos7.3系统 3.更新yum yum update 4.安装指定版本java yum -y install java-1.8.0-openjdk.x86_64 5.看文档Jenkins https://jenkins.io/zh/doc/pipeline/tour/getting-started/ 6.下载Jenkins http://mirrors...原创 2020-03-04 21:06:34 · 1006 阅读 · 0 评论 -
springboot接受不到axios的post请求参数
在参数前面加@RequestBody注解,注意是Request,idea会自动补全到@ResponseBody,两者是不一样的 @PostMapping("/app_data/external_arousal_report") public ExternalArousalResponse test(@RequestBody ExternalArousalRequest exter...原创 2020-01-21 13:46:13 · 2598 阅读 · 0 评论