- 博客(10)
- 收藏
- 关注
原创 mybatis-generator+Criteria+swagger+lombok自动生成实体类和dao层以及mapper.xml
自动生成mapper和domain,可以减少写sql语句的时间,一般的逻辑都可以使用,复杂的逻辑当然还是需要我们自己来写sql语句的,只是一些基本的增删改查就不需要浪费时间去写了,能够大大的提高效率,把重心放在代码逻辑上。先来看结果//实体类@ApiModel(value="com.example.springboot_shiro.domain.test.User")@Data@EqualsAndHashCode(callSuper = true)@ToString(callSuper = tr
2021-09-10 15:58:36
1698
2
原创 springboot使用Druid配置多数据源
参考文档:https://www.cnblogs.com/wangkongming/p/12878221.html之前没有使用过多数据源,由于项目需求需要,学习记录一下按照参考的文档配置完之后,启动有警告[ restartedMain] o.mybatis.spring.SqlSessionFactoryBean : Property ‘mapperLocations’ was specified but matching resources are not found.查询了一下,是因为两个
2021-09-10 15:06:41
967
原创 java线程Thread启动和结束线程
记录笔记//重写run方法,继承Runnablepublic class MissionThread implements Runnable {@Override public void run() { Date currentDate = new Date(); Mission mission = missionService.findMissionById(missionId); //线程休眠时间,休眠后线程启动,任务
2021-09-02 16:36:15
689
原创 获取当前时间所在周的第一天和最后一天,当前月的第一天和最后一天
获取当前日期所在周的第一天和最后一天 Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); // 获得当前日期是一个星期的第几天 int dayWeek = calendar.get(Calendar.DAY_OF_WEEK); if (1 == dayWeek) { calendar.add(Calendar.DAY_OF
2021-08-27 12:44:11
1221
原创 thymeleaf###使用th:each循环根据不同条件给<div>的class赋值
<div class="mr-5 ml-5"><h3>当前轮播图</h3></div> <div id="demo" class="carousel slide ml-5" data-ride="carousel" style="width: 800px;height: 300px;"> <!-- 指示符 --> <ul class="ca..
2021-08-04 17:13:58
1804
原创 thymeleaf超链接拼接
<a th:href="@{'/getMissionById?missionId='+${missionhot.missionId}}"></a>
2021-08-02 14:02:22
647
原创 springboot+thymeleaf写一个查询操作重新渲染界面
springboot+thymeleaf写一个查询操作重新渲染界面问题描述:接口返回的结果是数据已经发生了变化,但是浏览器当前界面显示没有发生改变初始界面最开始的源数据执行查询操作之后的源数据虽然返回的数据没有问题,但是界面不显示,网络请求是使用ajax,由于不是前后端分离,使用了Model的方法来存放数据并返回到界面后端controller层方法/** * 获取所有任务列表 * 第一次进入任务管理界面调用该接口 * @param model * @re
2021-07-29 12:03:52
666
原创 使用datetime-local选择时间和后端接口对接时的问题
记录使用datetime-local选择时间和后端接口对接时的问题前端<label>任务开始时间:</label> <input type="datetime-local" class="form-control" th:value="${#dates.format(mission.missionStartTime,'yyyy-MM-dd')}+'T'+${#dates.format(mission.missionStartTime,'HH:mm')}"name
2021-07-28 11:17:46
626
原创 2021-03-25
Flutter 局部刷新界面出现的问题 === There are multiple heroes that share the same tag within a subtree#做一个根据单选框的选项实现局部刷新,我们知道的使用setState()的来进行刷新,是重新渲染整个界面,而且使用setState()会占用内存,所以我选择了ValueNotifier来实现局部的刷新,而Radio的值改变时,我们一般用的setState()来实现值的变化和界面的刷新,为了减少内存的占用,我使用了ValueNot
2021-03-25 16:55:50
98
原创 初学flutter遇到的数据类型转换问题
这里写自定义目项目场景:初学flutter,在调用后端接口时出现的数据类型转换的小问题问题描述:在调用接口获取数据,出现_InternalLinkedHashMap项目场景:初学flutter,在调用后端接口时出现的数据类型转换的小问题问题描述:在调用接口获取数据,出现_InternalLinkedHashMap<String, dynamic>’ is not a subtype of type ‘String’ in type cast这个dioerror原因分析:提示:这里填写问题的
2021-02-02 21:15:28
1375
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人