![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
飞飞翼
这个作者很懒,什么都没留下…
展开
-
springboot普通类调用service方法
springboot原创 2022-10-02 22:17:20 · 686 阅读 · 0 评论 -
java 将HTML文件转成pdf
java html转成pdf 工具原创 2022-06-06 16:01:23 · 3486 阅读 · 3 评论 -
idea下启动多个实例(若依springcloud微服务)
idea下启动多个实例_BackBay2的博客-CSDN博客_idea多实例启动原创 2022-05-25 14:19:23 · 442 阅读 · 0 评论 -
mybatis 返回map 注意 是 resultType属性
Mybatis中返回Map在Mybatis中,我们通常会像下边这样用:返回一个结果User selectOne(User user);<select id="selectOne" parameterType="cn.lyn4ever.entity.User" resultType="cn.lyn4ever.entity.User"> select id,username,telphone from user where telphone=#{telphone原创 2020-06-29 21:47:38 · 1806 阅读 · 0 评论 -
web端小技巧
禁止自动提示autocomplete="off"原创 2020-01-16 13:46:42 · 163 阅读 · 0 评论 -
rabbitmq消息确认机制及死信队列的使用
关于rabbitmq的基本概念和相关的理论这里就不做过多介绍了,在之前的篇幅中有过相应的介绍,也可以查询一些资料详细了解一下rabbitmq的基础知识,下面要介绍的点主要包括两个方面,1、rabbitmq的消息确认机制;2、rabbitmq的延时队列,也称作为死信队列的一些研究心得分享为什么会产生消息确认这个概念呢?其实rabbitmq的模式是我们熟悉的典型的观察者模式的具体实现,或者说...转载 2019-12-24 23:40:59 · 469 阅读 · 0 评论 -
请求头
1.application/x-www-form-urlencoded接口调单独参数用的2.'application/json'传对象用的原创 2019-10-31 19:10:13 · 105 阅读 · 0 评论 -
java --spring-boot
1.map转json List<ProductAttr> PersonList=JSON.parseArray(listGoodList.get(i).getProductAttr(),ProductAttr.class);<dependency> <groupId>com.alibaba</gr...原创 2019-10-22 20:57:55 · 90 阅读 · 0 评论 -
想要在js中使用thymeleaf
<script th:inline="javascript"></script>原创 2019-10-03 16:29:49 · 952 阅读 · 0 评论 -
编写maven项目出现invalid bound statement (not found)异常
IntelliJ IDEA编写maven项目出现invalid bound statement (not found)异常原因:maven打包项目时未将mapper(或dao包)的xml文件一起打包解决方法:在pom.xml中添加如下代码 <build> ... <resources> <resource> ...原创 2019-09-02 00:59:49 · 585 阅读 · 0 评论 -
spring-boot集成mybatis是容易犯的错误
1.当dao层传递多个参数是会报错org.apache.ibatis.binding.BindingException: Parameter 'productAttributeCategoryId' not found. Available parameters are [arg1, arg0, param1, param2] 翻译如下org.apache.ibatis.bind...原创 2019-08-29 20:46:00 · 195 阅读 · 0 评论 -
关于报错:There is already 'xxxController' bean method的解决方法
报这个错的原因是因为你controller里的@RequestMapping中的路径有重复!如:愿你眼中有光芒,活成你想要的模样转载 2019-08-28 23:19:02 · 4165 阅读 · 0 评论 -
Spring RestTemplate中几种常见的请求方式
在Spring Cloud中服务的发现与消费一文中,当我们从服务消费端去调用服务提供者的服务的时候,使用了一个很好用的对象,叫做RestTemplate,当时我们只使用了RestTemplate中最简单的一个功能getForEntity发起了一个get请求去调用服务端的数据,同时,我们还通过配置@LoadBalanced注解开启客户端负载均衡,RestTemplate的功能不可谓不强大,那么今天我...原创 2019-08-18 21:36:42 · 138 阅读 · 0 评论 -
spring-cloud实现热部署
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>...原创 2019-08-05 23:13:35 · 611 阅读 · 0 评论 -
docker常用命令 镜像创建、容器启动...
docker 将现有容器修改后保存为新容器docker commit xxx(CONTAINER ID) yyy(新的镜像名称)利用docker commit生成新镜像,然后docker run -it 运行新镜像,发现容器挂载目录下没有任何文件了。说明生成新镜像时,是不保存挂载文件的docker启动新容器并运行ssh服务,将宿主机的6666端口映射为ssh服务端口22##...转载 2019-07-28 11:41:16 · 205 阅读 · 0 评论 -
spring-boot中使用缓存步骤
0.在创建项目的时候选择cache模块1.在启动类上添加注释@EnableCaching 开启基于注解的缓存2.在service层 添加i相关缓存注解3.@Cacheable和@CachePut配置使用(value值必须一样【同一个缓存管理器】,key值必须一样【操作的同一个值】)注释介绍redis与Spring Cache的整合请参看上章@Cacheab...原创 2019-07-18 20:23:51 · 194 阅读 · 0 评论 -
springboot------整合mybatis
1.注解版0.配置文件spring: datasource: username: root password: 123456# ?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC url: jdbc:mysql://localhost:...原创 2019-07-16 20:50:01 · 99 阅读 · 0 评论 -
spring-boot------------------异步,定时任务
异步1.在方法上标注 @Async//告诉spring 这是一个异步方法2.在启动器上标注 @EnableAsync//开启异步注解定时任务1.在方法上标注 @Scheduled2.在启动器上标注 @Scheduled//开启异步注解...原创 2019-07-28 21:58:46 · 88 阅读 · 0 评论 -
关于SpringDataJpa中findOne()方法报错问题
关于使用springDataJpa的时候发现findOne()没有啦,很奇怪查询网上的一些建议,确实,此文章引用:https://blog.csdn.net/lzj4423996/article/details/79437687我使用的是2.0.3,并没有感觉有什么不妥,因为这个东西更新我也就跟着更新啦,接着项目方法报错,继承CrudRepository以后不能直接使用findOne,...转载 2019-07-16 22:53:16 · 590 阅读 · 0 评论 -
Could not autowire. No beans of '' type found. less... (Ctrl+F1) Checks autowiring problems in a be
提示报错:Could not autowire. No beans of '' type found. less... (Ctrl+F1) Checks autowiring problems in a bean class错误,网上找了很多办法都是进setting把IDE的提醒去掉,但我觉得这跟掩耳盗铃没啥区别,终于看到了一个正解解决办法:在DAO层添加@Repository注解@Re...原创 2019-07-17 09:05:42 · 1877 阅读 · 0 评论 -
spring-boot日志配置 logging.path logging.file 注意事项
springboot日志配置 logging.path logging.file 注意事项可能有些小伙伴会同时配置 logging.path 和 logging.file,但是又发现其中一个不生效。官方文档中有这么一句:If you want to write log files in addition to the console output youneed to set a ...原创 2019-07-17 09:43:47 · 1324 阅读 · 1 评论 -
在springBoot的控制台打印sql语句
在springBoot+Mybatis日志显示SQL的执行情况的最简单方法就是在properties新增:properties形式logging.level.com.eth.wallet.mapper=debugyml形式logging: level: com.eth.wallet.mapper: debug其中com.eth.wallet.mapper为你...转载 2019-07-17 10:14:52 · 231 阅读 · 0 评论 -
玩转SpringBoot之定时任务详解
阅读目录:序言 一、静态:基于注解 二、动态:基于接口 三、多线程定时任务阅读正文:回到顶部序言使用SpringBoot创建定时任务非常简单,目前主要有以下三种创建方式:一、基于注解(@Scheduled) 二、基于接口(SchedulingConfigurer) 前者相信大家都很熟悉,但是实际使用中我们往往想从数据库中读取指定时间来动态执行定时任务,这时候基于...原创 2019-07-17 10:16:08 · 99 阅读 · 0 评论 -
1.用docker下载安装redis
1.安装docker pull redis2.验证安装docker images结果REPOSITORY TAG IMAGE ID CREATED SIZEdocker.io/redis 3.2 87856cc39862 9 ...原创 2019-07-19 15:25:34 · 97 阅读 · 0 评论 -
Mybatis 返回插入的数据的id
1.mapper.xml keyProperty="id" useGeneratedKeys="true" keyColumn="id"这样就行了2.取出来 直接用实体类的get方法就能取出来了原创 2019-08-03 10:29:18 · 82 阅读 · 0 评论 -
Spring Security 无法登陆,报错:There is no PasswordEncoder mapped for the id “null”
编写好继承了WebSecurityConfigurerAdapter类的WebSecurityConfig类后,我们需要在configure(AuthenticationManagerBuilder auth) 方法中定义认证用于信息获取来源以及密码校验规则等。(configure函数名字不重要,官方用的好像是configureGlobal(……),重要的是在这个被@EnableWebSecuri...原创 2019-07-31 13:09:04 · 139 阅读 · 0 评论 -
SpringBoot与thymeleaf版本问题冲突
1.报错如下An attempt was made to call the method org.thymeleaf.spring5.SpringTemplateEngine.setRenderHiddenMarkersBeforeCheckboxes(Z)V but it does not exist. Its class, org.thymeleaf.spring5.SpringTempla...转载 2019-07-31 23:44:54 · 349 阅读 · 0 评论 -
Spring Boot+Spring Security+Thymeleaf 简单教程
因为有一个项目需采用MVC构架,所以学习了Spring Security并记录下来,希望大家一起学习提供意见GitHub地址:https://github.com/Smith-Cruise/Spring-Boot-Security-Thymeleaf-Demo如果有疑问,请在GitHub中发布issue,我有空会为大家解答的本项目基于Spring Boot 2 + Spring Sec...原创 2019-08-01 10:13:10 · 464 阅读 · 0 评论 -
springboot笔记截图
文字版本//自动生成框架之后1. 修改pom文件 <!--继承父项目--> <parent> <groupId>org.springframework.boot</groupId>...原创 2019-06-23 14:05:17 · 274 阅读 · 0 评论