![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
文章平均质量分 59
小可乐-我一直在
这个作者很懒,什么都没留下…
展开
-
根据地名查询经纬度
根据地名查询经纬度原创 2023-01-17 16:01:29 · 515 阅读 · 0 评论 -
搭建简易websocket 服务器
上代码引用:<!--websocket--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket</artifactId> </dependency>配置类import org.spring原创 2020-10-16 15:08:53 · 1029 阅读 · 2 评论 -
虹软linux运行问题
将SDK的jar包作为依赖打入工程的jar包中。将SDK中的jar包放入"/.m2/repository/com/why/dev/arcface/sdk/arcsoft-sdk-face/2.0.0.0"路径下,即本地Maven仓库中,然后在工程的pom文件中加入如下依赖:com.why.dev.arcface.sdkarcsoft-sdk-face2.0.0.0在"/.m2/repository/com/why/dev/arcface/sdk/arcsoft-sdk-face/2.0.0.0转载 2020-06-01 21:07:39 · 480 阅读 · 0 评论 -
springboot创建简易聊天室
做下记录 copy代码能用<!-- springboot websocket --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket</artifactId> </dependency>注入b原创 2020-05-27 17:17:36 · 332 阅读 · 0 评论 -
多线程迭代for循环查询
最近有个业务,要查询自定义的日历,还要统计每天的数据,for循环时间太长,想用线程来缓解下尴尬,做以下记录,免得以后忘记,大佬们勿喷List<String> dateTimeListByStartAndEnd = DateUtil.getDateTimeListByStartAndEnd(starttime, endtime, 1, 3); List<Object> list = Collections.synchronizedList(new Array原创 2020-05-26 09:55:09 · 934 阅读 · 0 评论 -
springboot导出word
记录boot两种导出word的方式方式一:通过模仿 excel 进行导出引jar包 <!-- 增加poi依赖--> <dependency> <groupId>com.deepoove</groupId> <artifactId>poi-tl</artifactId> <version>0.0.3</version>原创 2020-05-14 17:11:10 · 5655 阅读 · 8 评论 -
spring 根据redis实现的拦截效果
controller:@Delay(time = 2) <--重点是这个注解 @ApiOperation("用户换书开格子") @PostMapping("/user/inbooks/open/grid") public ResultData inbooksOpenGrid(@RequestBody InBookVO inBookVO) throws Excep...原创 2020-05-07 17:56:44 · 141 阅读 · 0 评论 -
微信退款SpringBoot读取resource下的证书
近期做了一个微信支付退款接口,需要证书双向验证,测试的时候证书暂时放在resource下,上图起初MyConfig中我是这样,在本机IDE中运行没有问题import org.springframework.util.ResourceUtils; public MyConfig() throws Exception { File file = (ResourceUtils....转载 2019-12-23 19:55:46 · 718 阅读 · 0 评论 -
springboot 导入 excel
<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-scratchpad</artifactId> <version>3.11-beta2</version> </dep...原创 2019-11-26 14:23:40 · 159 阅读 · 0 评论 -
springboot重复提交
上代码,单服务器可以用本地缓存:/** * @author changwensong * @data 2019/11/6 0006 -上午 11:47 * TODO 自定义重复提交注解 */@Inherited@Target(ElementType.METHOD)@Retention(RetentionPolicy.RUNTIME)@Documentedpublic @inte...原创 2019-11-06 13:55:05 · 334 阅读 · 0 评论 -
静态工具类引用 配置文件值
事由:springboot 项目 用到静态的工具类来 引用配置(yml获取这 pro)文件中的值直接@Value("${xxx.xxx.xx}") 不可以 直接就不能用结果:Environment environment = ApplicationContextUtils.get(Environment.class);String value= environment.getProper...原创 2019-10-18 11:59:26 · 776 阅读 · 0 评论 -
springboot静态方法 引用bean
现在用springboot,将公有方法抽出写成一个静态方法,方便调用@Componentpublic class GetRoleUtil { @Autowired private UserMapper userMapper; @Autowired private static UserMapper staticuserMapper; @PostCo...原创 2019-07-08 17:42:57 · 1711 阅读 · 1 评论 -
springboot如何在static方法中使用自动注入的属性
第一步:写注解@Component 使当前类成为一个bean对象。(@Controller,@service都行)第二步:写个static的变量第三步:写个@PostConstruct注解注解注释的方法,在这个方法里,将自动注入的值赋值给定义的static变量第四步:static变量替代自动注入在static方法里面使用复制代码@Componentpublic class DSHWec...转载 2019-06-20 14:15:33 · 2607 阅读 · 0 评论