随笔分类 -  java-springboot

springboot整合https
摘要: 阅读全文
posted @ 2022-04-19 10:42 groby 阅读(27) 评论(0) 推荐(0) 编辑
springboot引入第三方jar包-idea
摘要:原文转载自:https://www.cnblogs.com/netcorner/p/10962981.html 在开发过程中有时会用到maven仓库里没有的jar包或者本地的jar包,这时没办法通过pom直接引入,那么该怎么解决呢 一般有两种方法 第一种是将本地jar包安装在本地maven库 第二种 阅读全文
posted @ 2022-03-31 14:11 groby 阅读(1904) 评论(0) 推荐(0) 编辑
SpringBoot设置事务隔离等级
摘要:SpringBoot设置事务隔离等级 Spring Boot 使用事务非常简单,首先使用注解 @EnableTransactionManagement 开启事务支持后,然后在访问数据库的Service方法上添加注解 @Transactional 便可。(在下文中会有图例) 关于事务管理器,不管是JP 阅读全文
posted @ 2022-02-10 15:01 groby 阅读(2173) 评论(0) 推荐(0) 编辑
springboot中使用事务
摘要:在springboot中使用事务,非常的简单,只要我们增加两个注解就可以解决事务问题。下面我们演示一下: 1 在入口类使用注解@EnableTransactionManagement开启事务: 2、 在访问数据库的service方法上添加注解@Transactional即可 例如我们在程序中增加一个 阅读全文
posted @ 2022-02-10 14:57 groby 阅读(2463) 评论(0) 推荐(1) 编辑
JAVA 获取当前时间(年月日时分秒)
摘要:获取当前时间(年月日时分秒) Date d = new Date(); SimpleDateFormat sbf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); System.out.println(sbf.format(d)); 或 System.ou 阅读全文
posted @ 2022-01-26 11:30 groby 阅读(4505) 评论(0) 推荐(0) 编辑
SpringBoot整合Jdbc
摘要:SpringBoot整合Jdbc (1)、添加相关依赖 1 <dependency> 2 <groupId>org.springframework.boot</groupId> 3 <artifactId>spring-boot-starter-jdbc</artifactId> 4 </depen 阅读全文
posted @ 2022-01-25 15:58 groby 阅读(106) 评论(0) 推荐(0) 编辑