- 博客(18)
- 收藏
- 关注
原创 时间戳转换为天小时分钟
使用当前的时间戳减去数据库中查到的时间戳除以1000转换为秒 (System.currentTimeMillis()-date.getTime())/1000 public static String formatDateTime(long s) { String DateTimes = ""; long day = (s / (60 * 60 * 24)); long hours = (s / (60 * 60* 24)) / 24; lo
2021-05-10 09:07:59
3152
原创 lihaile Maven设置
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-0Q6rCIxt-1618352939340)(Pictures/logo.jpg)] Author:Shine Version:9.0.2 文章目录一、引言1.1 项目管理问题1.1.1 繁琐1.1.2 复杂1.1.3 冗余1.2 项目管理方案二、介绍三、Maven安装3.1 下载Maven3.2 Maven安装3.2.1 解压3.2.2 环境变量3.2.3 测试四、Maven配置4.1 本地仓库4.2 JDK配置五、仓库5
2021-04-19 09:23:53
1253
原创 springboot中获取HttpServletRequest对象
获取HttpServletRequest对象 HttpServletRequest req = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); 获取session HttpSession session = req.getSession(); 获取属性 TUserEntity user = (TUserEntity)req.getAttribute("userinfo") .
2021-04-04 10:24:12
458
原创 全局异常相关问题
全局异常需要添加@ControllerAdvice@Component这两个注解 如果将全局异常放到公共的maven项目模块中依赖不可传递 公共的全局异常相当于以jar包的形式加入到需要用到的其他工程中 所以在其他模块中需要使用这个全局异常需要配置包扫描, @SpringBootApplication(scanBasePackages = "com.qf",exclude = DataSourceAutoConfiguration.class) <dependency>
2021-04-01 10:21:39
166
原创 H-ui验证码的倒计时及异步发送验证用户名
按钮 <input type="text" class="input-text" value="李四" ajaxurl="http://localhost/shop-sso/sso/validataUsername" id="user-name" name="username" datatype="*2-16" nullmsg="用户名不能为空"> <input type="button" id="sendCodeBut" class="btn btn-primary radius" va
2021-03-31 08:42:37
175
原创 SpringCloud
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-N9juMG4q-1615811544821)(Pictures/1587880250279.png)] Author:Eric Version:9.0.0 文章目录一、SpringCloud介绍1.1 微服务架构1.2 SpringCloud介绍二、服务的注册与发现-Eureka【`重点`】2.1 引言2.2 Eureka的快速入门2.2.1 创建EurekaServer2.2.2 创建EurekaClient2.2.3 测
2021-03-16 08:38:11
234
原创 MySQL
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传https://gitee.com/lihaile0710/mysql/blob/master/Pictures/001.png Author:Gavin Version:9.0.2 文章目录一、引言1.1 现有的数据存储方式有哪些?1.2 以上存储方式存在哪些缺点?二、数据库2.1 概念2.2 数据库的分类三、数据库管理系统3.1 概念3.2 常见数据库管理系统四、MySQL4.1 简介4.2 访问与下载4.3 安装4.4 卸载4.5
2021-03-16 08:37:53
227
原创 ElasticSearch查询
GET _search { "query": { "match_all": {} } } POST _analyze { "analyzer": "ik_max_word", "text": "中国人民" } PUT /person { "settings": { "number_of_shards": 5 , "number_of_replicas": 1 } } GET /person PUT /book { "settings": {
2021-02-28 11:31:13
175
原创 Linux常用命令
ifconfig -a #查看IP systemctl status docker #查看进程服务 pwd #查看当前所在位置 # 针对服务的启动,停止,重启,开机自动启动,禁止开机自动启动,查看服务状态。 systemctl start|stop|restart|enable|disable|status 服务名称 ...
2021-02-22 08:41:55
97
原创 二级菜单 多级菜单 递归获取
二级菜单的获取 private List<Menu> markMenuTree(List<Menu> menuTree) { //保存树状菜单数据 List<Menu> list=new ArrayList<>(); //创建map集合暂时存储菜单数据,方便整合多级菜单 Map<Integer,Menu> map=new HashMap<>(); for
2021-02-02 11:33:47
732
原创 批量新增 批量删除
权限管理 批量新增权限 dao层方法 void addRoleMenu(@Param("roleId") Integer roleId,@Param("menuIds") Integer[] menuIds); mapper实现 <!-- 批量添加新增的权限--> <insert id="addRoleMenu"> insert into role_menu values <foreach collection="menuIds" item="menuI
2021-02-02 11:29:44
146
原创 ssm常用注解
@RestController 控制层的注解,返回的值默认值是Json数据 @RequestMapping 访问路径的设置 @Controller 控制层的注解 @Autowired 自动注入 @Service 业务层 @RequestParam 用于接收前端页面传过来的值,可以设置默认值来防止前端页面传空数据过来 @RequestMapping("/table") public TableResult table(@RequestParam(defaultValue = "1") Intege
2021-02-01 21:10:23
193
原创 jdbc主键回填
jdbc主键回填 public static int commonInsert(String sql, Object... args) { Connection connection = DBUtils.getConnection(); PreparedStatement prst = null; try { prst = connection.prepareStatement(sql, Statement.RETURN_GENER
2021-01-30 13:57:10
362
原创 spring-mybatis-springmvc
<?xml version="1.0" encoding="UTF-8"?> <context:property-placeholder location="classpath*:jdbc.properties"></context:property-placeholder> <context:component-scan base-package="com.qf.emp"> <context:exclude-filter type=
2021-01-30 10:21:14
114
原创 mybatis中set/where/trim/foreach标签以及concat(解决模糊查询)函数的使用
mybatis中set/where/trim/foreach标签以及concat(解决模糊查询)函数的使用 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!-- namespace必须是
2021-01-30 10:18:57
671
原创 layui中table基本操作及时间的格式化
layui table基本操作 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <link rel="stylesheet" href="/layui/css/layui.css"> <script src="/layui/layui.js"></scr
2021-01-30 10:12:12
825
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅
1