![](https://img-blog.csdnimg.cn/20190927151043371.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
springboot
springboot
AntHub
闻道有先后,术业有专攻;
有道无术尚可求,有术无道止于术;
熵减、熵减、熵减,还是熵减。
展开
-
springboot 打印请求路径到 日志 控制台
文章目录application.properties 添加:logging.level.org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping=trace有单独的日志配置文件 logback.xml ,则添加:...<logger name="org.springframework.web.servlet.mvc.method.annotation.RequestMapp原创 2021-04-08 22:23:53 · 681 阅读 · 0 评论 -
springboot 备忘录
文章目录启动启动nohup java -jar ./boot-server.jar --server.port=8090 --spring.profiles.active=test --application.custom_prop=xxxx -Dspring.config.location=/opt/xxx/bootstrap.yml >./nohup.log 2>&1 &原创 2020-12-21 09:31:37 · 278 阅读 · 0 评论 -
springboot 事务注解 @Transactional 不生效
文章目录在业务层手工捕捉并处理了异常(try…catch)等于把异常“吃”掉了;这是最常见的情况,在boot未流行时就经常遇到这个问题,手动 捕获异常 Spring自然不知道这里有错,更不会主动去回滚数据。推荐做法是在业务层统一抛出异常,然后在控制层统一处理。Spring的默认的事务规则是遇到运行异常(RuntimeException)和程序错误(Error)才会回滚,而异常是继承自 Exception 也会导致失效。如果想针对非检测异常进行事务回滚,可以在@Transactional 注解里原创 2020-11-16 15:24:57 · 644 阅读 · 0 评论 -
springboot创建方式
Spring Boot整合了哪些框架?Spring IO Platform:用于版本化应用程序的企业级分发。Spring Framework:用于事务管理、依赖注入、数据访问、消息传递和Web应程序。Spring Cloud:用于分布式系统,用于构建或部署你的微服务。Spring Data:用于与数据访问相关的微服务,不管是映射还是归约,关系型还是非关系型。Spring Batch:用于...原创 2020-01-05 18:04:29 · 108 阅读 · 0 评论 -
springboot 数据源
建表语句CREATE TABLE `user` ( `uid` int(11) NOT NULL AUTO_INCREMENT, `uname` varchar(100) NOT NULL, `pwd` varchar(100) NOT NULL, PRIMARY KEY (`uid`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;配置文件...原创 2019-11-17 19:37:47 · 129 阅读 · 0 评论 -
springboot hello-world
pom<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:...原创 2019-11-16 15:51:35 · 92 阅读 · 0 评论