![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring boot
努力不脱发选手
努力的程度要超过父母老去的速度。
展开
-
利用try catch 来throw错误 预防后端报错导致前端无法正常显示
不写try catch 亲人两行泪 要从controller层 到 service层 通通要写try catch @POST @Path("xxx") public ResponseBean exportTransExcpOrder(TransExcProcessQueryVo vo) { ResponseBean responseBean = new ResponseBean(); try { // 这service里面可能会原创 2020-12-22 14:11:46 · 975 阅读 · 0 评论 -
一个springboot里面的常用注入
@Value springboot框架配置了多环境运行,使用@Value这个注解,将环境变量写在配置文件中,让他根据运行的环境进行读取。 //YML配置文件 xxxURL: xxx.xxx/xxxx @Service public class TesseractOrcServiceImpl implements TesseractOrcService { @Value("${xxxURL}") private String xxxURL; } yml里面存放了键值对,然后这里我们k原创 2020-12-04 11:04:11 · 349 阅读 · 0 评论