随笔分类 - Java.SpringBoot
摘要:本文例程:https://files.cnblogs.com/files/heyang78/redisCache-contextpath_210924.rar 例程采用的SpringBoot版本是:v2.5.4 一般来说,springBoot工程启动后都是通过http://localhost:808
阅读全文
摘要:本文例程下载:https://files.cnblogs.com/files/heyang78/redisCache_Interceptor_sample_210922.rar 本文适用SpringBoot版本:v2.5.4 有这样一个RestController类如下: import org.sp
阅读全文
摘要:本文例程下载:https://files.cnblogs.com/files/heyang78/redisCache_multiEnv_config_210921.rar 本文适用版本:Spring Boot v2.5.4 本文使用配置文件类型:YAML,非properties,这种文件用缩进代表层
阅读全文
摘要:本文适用于SpringBootv2.5.4版本。 例程下载: https://files.cnblogs.com/files/heyang78/myBank-timedtask-210911_2129.rar 使用前提: 1.pom.xml引入spring-boot-starter-web依赖 <d
阅读全文
摘要:转账主动端例程下载:https://files.cnblogs.com/files/heyang78/myBank_tranfer_active_210910.rar 转账被动端例程下载:https://files.cnblogs.com/files/heyang78/myBank_transfer
阅读全文
摘要:本文涉及RabbitMq版本3.7.18,Springboot版本:2.5.4。 之前我们探讨了单库转账,这回准备来实现一个跨库转账,实现声明这只是原理性实现,不是最终版本。 实现的想法是在A机的本地账户扣款,然后把远程账户和加款金额发到队列里,B机接到消息后更新本地库的对应账户。 A机为T440p
阅读全文
摘要:本文例程:https://files.cnblogs.com/files/heyang78/myBank_transactional_checkedException_210909_0616.rar 本文涉及Springboot版本:2.5.4 前文 https://www.cnblogs.com/
阅读全文
摘要:本文涉及Springboot版本:2.5.4 例程:https://files.cnblogs.com/files/heyang78/myBank_transactional_210909_0526.rar 前言:使用JDBC操作单机数据库时,利用Connection对事务处理保证多个操作的不可分割
阅读全文
摘要:本文例程下载:https://files.cnblogs.com/files/heyang78/myBank_themeleaf_post_addstu_210906.rar 第一步:准备含有form的页面。 ...... <table border="0px" width="160px"> <tb
阅读全文
摘要:本文例程下载:https://files.cnblogs.com/files/heyang78/myBank_showdataonpage_210906.rar 只要网页出现了,让其中显示数据就不难,因为控制器里可以注入Mapper,而Mapper是访问DB的,取出数据后放到Model里就好。随后页
阅读全文
摘要:本文例程下载:https://files.cnblogs.com/files/heyang78/myBank_thymeleaf_210906.rar 本文将带您重返石器时代,品尝下本质依旧是jsp/servlet的所谓SpringBoot/thymeleaf新酒。 正文开始: 第一步:在pom.x
阅读全文
摘要:本文例程下载:https://files.cnblogs.com/files/heyang78/myBank_mybatis_oracle_junit_210905_1453.rar 本文涉及到的Oracle版本:11.2.0.1.0,SpringBoot版本:2.5.4,MyBatis选择Spri
阅读全文
摘要:本文涉及的Oracle版本:11.2.0.1.0,SpringBoot版本:2.5.4 例程下载:https://files.cnblogs.com/files/heyang78/myBank_mybatis_oracle_junit_210905_1453.rar 今日在SpringBoot工程中
阅读全文
摘要:本例适用版本: SpringBoot:2.5.4 Oracle:11.2.0.1.0 不保证本例在其它版本依然适用 先决条件: SpringBoot工程能与目标DB顺畅连接。 下面正文开始: 1.在application.properties中加入以下文字: spring.sql.init.mode
阅读全文
摘要:下载地址:https://files.cnblogs.com/files/heyang78/myBank_mybatis_oracle_junit_210905_1453.rar 之所以准备这个是因为创建Spring Starter工程的时间太漫长了,似是网络不稳定所致。 工程里仅有OracleDB
阅读全文
摘要:如果本地无法创建Spring工程,可以到如下网址下载一个起始包,然后import到STS中去。 https://start.spring.io/
阅读全文
摘要:在src/main/resources下准备一个文本文件banner.txt,然后把下面网站制造的文本粘进去,启动程序,控制台里就看到内容了。 http://patorjk.com/software/taag END
阅读全文
摘要:出错原因:MySQL依赖及MySQL驱动包高于在使用的MySQL数据库版本。 比如,我本地数据库版本是:Server version: 5.2.3-falcon-alpha-community-nt 但是载入的MySQL依赖是: <dependency> <groupId>mysql</groupI
阅读全文
摘要:下载地址:https://files.cnblogs.com/files/xiandedanteng/agumaster20200501.zip
阅读全文
摘要:本文例程下载:https://files.cnblogs.com/files/xiandedanteng/agumaster20200430-1.zip 之前的分页方案有点小瑕疵,这回修正了一下。 控制类: package com.ufo.hy.agumaster.ctrl; import java
阅读全文