![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring Boot
文章平均质量分 70
月光降临人间
这个作者很懒,什么都没留下…
展开
-
Spring如何在一个事务中开启另一个事务
Spring如何在一个事务中开启另一个事务原创 2022-04-19 21:21:23 · 1933 阅读 · 0 评论 -
springboot接收对象ajax数据(json格式)
$.ajax({ type: 'POST', // contentType : "application/json", data: { "mobile": mobile, "id": orderId }, url...原创 2019-10-30 14:56:17 · 4105 阅读 · 0 评论 -
springboot无法启动,不报任何异常,添加日志
Logger不打印日志,缺少配置文件所致,因此在资源目录下添加一个log4j.properties日志文件,内容如下:##########Set Log Levels###############log4j.rootLogger = ERROR, console######### 输出到控制台 ####################log4j.appender.console = o...原创 2019-10-28 09:35:36 · 1118 阅读 · 0 评论 -
Spring Boot 读取配置文件到静态工具类
1.静态工具类中@Componentpublic class EntityListUtils { private static final Logger logger = LoggerFactory.getLogger(EntityListUtils.class); @Autowired private ConfigProperties configPropertie...原创 2018-03-26 17:13:19 · 7646 阅读 · 0 评论 -
springboot Restful风格Controller层方法参数
@RestController@RequestMapping(value = "/users")public class UserController { /** * 创建线程安全的Map */ static Map<Long, User> users = Collections.synchronizedMap(new HashMap<Lo...原创 2018-04-03 15:53:17 · 5758 阅读 · 0 评论 -
springboot全局异常处理(包含404错误处理)
个人整理参考文档:一:解决spring boot中rest接口404,500等错误返回统一的json格式(备用地址)二:SpringBoot入门——局部与全局的异常处理(备用地址)三:SpringBoot全局异常处理(备用地址)四:springboot springmvc 抛出全局异常解决方法(备用地址)...原创 2018-06-21 17:18:06 · 20809 阅读 · 0 评论 -
阿里druid-spring-boot-starter 配置(配置完成后不需要在配置类写)根据阿里官方个人整理
# JDBC 配置(驱动类自动从url的mysql识别,数据源类型自动识别)# 或spring.datasource.url=spring.datasource.druid.url=jdbc:mysql://192.168.1.105:13306/euler_app?useUnicode=true&characterEncoding=UTF8# 或spring.datasource....原创 2018-06-14 15:13:54 · 19107 阅读 · 7 评论 -
Restful API 访问spring boot项目,controller方法参数写法(自用)
get访问格式如下时:http://localhost/hi?name=qlinc //controller注解默认@RestController @RequestMapping(value = "/hi") public String hi(@RequestParam String name){ return helloService.hiServi...原创 2019-06-28 16:27:01 · 1279 阅读 · 0 评论