随笔分类 -  Spring Boot

摘要:Ubuntu系统添加新的普通用户,Spring boot 应用运行在普通用户,提高安全性 在使用Ubuntu系统的过程中,一般不建议直接使用root用户,建议新建一个或多个普通用户,平时的大数据实验操作都使用普通用户登录Ubuntu系统。购买了阿里云的云服务器ECS实例以后,就可以打开浏览器,通过网 阅读全文
posted @ 2022-09-28 19:40 anakinf 阅读(153) 评论(0) 推荐(0) 编辑
摘要:找出能与WSL2连接的那个IP。启动WSL2,在子系统Linux键入如下命令: cat /etc/resolv.conf 如: nameserver 172.27.160.1 172.27.160.1就是我们要找的Windows的IP Address 找出wsl的ip启动WSL2,键入如下命令: $ 阅读全文
posted @ 2022-09-20 19:32 anakinf 阅读(1831) 评论(0) 推荐(0) 编辑
摘要:一、添加用户 sudo useradd anakin -d /home/anakin -m cat /etc/passwd | grep anakin 二、设置密码 sudo passwd anakin 三、给用户添加sudo权限 #增加写权限 sudo chmod u+w /etc/sudoers 阅读全文
posted @ 2022-05-11 16:28 anakinf 阅读(120) 评论(0) 推荐(0) 编辑
摘要:今天idea过期了,要马上编译项目,想到了重置试用 rm -rf ~/Library/Preferences/JetBrains/Idea**** rm -rf ~/Library/Caches/JetBrains/Idea**** rm -rf ~/Library/Logs/JetBrains/I 阅读全文
posted @ 2021-12-08 10:59 anakinf 阅读(2145) 评论(1) 推荐(1) 编辑
摘要:1 SET @update_id := 0; 2 UPDATE some_table SET row = 'value', id = (SELECT @update_id := id) 3 WHERE some_other_row = 'blah' LIMIT 1; 4 SELECT @update 阅读全文
posted @ 2020-11-10 20:24 anakinf 阅读(2255) 评论(0) 推荐(0) 编辑
摘要:#!/bin/bash#包名AppName=xfsup-admin.jar#启动环境参数START_OPTS spring.profiles.active=test#JVM参数JVM_OPTS="-Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms51 阅读全文
posted @ 2020-09-25 20:57 anakinf 阅读(399) 评论(0) 推荐(0) 编辑
摘要:<th:block th:each="image : ${#strings.listSplit(goods.images, ';')}"> <img th:src="${image}" style="max-height: 150px;"></th:block> 阅读全文
posted @ 2020-06-16 21:11 anakinf 阅读(1083) 评论(0) 推荐(0) 编辑
摘要:日期格式、组件提取等. ${#dates.format(date)} ${#dates.arrayFormat(datesArray)} ${#dates.listFormat(datesList)} ${#dates.setFormat(datesSet)} ${#dates.format(dat 阅读全文
posted @ 2020-06-16 21:09 anakinf 阅读(339) 评论(0) 推荐(0) 编辑
摘要:idea在调试时出现Method breakpoints may dramatically slow down debugging,一直卡在 Initializing Spring embedded WebApplicationContext 断点打在方法某个断点卡住了。 快捷键:Ctrl - Sh 阅读全文
posted @ 2020-02-07 15:46 anakinf 阅读(748) 评论(0) 推荐(0) 编辑
摘要:idea 好多激活码都用不了了,网上搜出全用不了。 http://active.chinapyg.com 阅读全文
posted @ 2018-07-11 06:23 anakinf 阅读(3234) 评论(0) 推荐(0) 编辑
摘要:最近有个项目,需要在web上批量给设备设置智能围栏,设备超出范围报警,查看高德地图webJS API,web端操作案例如,后台判断没有提供源码 阅读全文
posted @ 2018-03-30 13:48 anakinf 阅读(2301) 评论(0) 推荐(0) 编辑
摘要:很多时候,我们项目在开发环境和生成环境的环境配置是不一样的,例如,数据库配置,在开发的时候,我们一般用测试数据库,而在生产环境的时候,我们是用正式的数据,这时候,我们可以利用profile在不同的环境下配置用不同的配置文件或者不同的配置 spring boot允许你通过命名约定按照一定的格式(app 阅读全文
posted @ 2018-03-14 20:19 anakinf 阅读(13715) 评论(0) 推荐(0) 编辑
摘要:通过profile注解来处理。 Swagger的congif类上声明@Profile({"dev", "test"}),发布到生产上使用product的profile时, swagger关闭 阅读全文
posted @ 2018-03-14 20:17 anakinf 阅读(1058) 评论(0) 推荐(0) 编辑
摘要:这里总结出用IDEA打包jar包的多种方式,以后的项目打包Jar包可以参考如下形式: 用IDEA自带的打包方式: 打开IDEA的file -> Project Structure,进入项目配置页面。如下图: 点击Artifacts,进入Artifacts配置页面,点击 + ,选择如下图的选项。 进入 阅读全文
posted @ 2017-11-12 20:33 anakinf 阅读(6069) 评论(0) 推荐(0) 编辑
摘要:阿里云ECS部署spring-boot访问redis出现redis.clients.jedis.HostAndPort - cant resolve localhost address 摘要: 阿里云ECS部署spring-boot+redis的坑 问题LOG 2017-08-17 09:06:52 阅读全文
posted @ 2017-11-12 20:26 anakinf 阅读(4362) 评论(0) 推荐(0) 编辑
摘要:第一次部署spring boot 到linux上,用命令java -jar **.jar,发现应用自动退出,进程停止了。后来发现要不挂断的执行命令,忽略所有的挂断信号,用以下命令解决 nohup java -jar **.jar& nohup: 不挂断的执行命令,忽略所有的挂断信号。 运行后台命令 阅读全文
posted @ 2017-11-12 20:22 anakinf 阅读(10066) 评论(1) 推荐(0) 编辑

点击右上角即可分享
微信分享提示