SSM
飞飞翼
这个作者很懒,什么都没留下…
展开
-
请求头
1.application/x-www-form-urlencoded接口调单独参数用的2.'application/json'传对象用的原创 2019-10-31 19:10:13 · 108 阅读 · 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 · 196 阅读 · 0 评论 -
关于报错:There is already 'xxxController' bean method的解决方法
报这个错的原因是因为你controller里的@RequestMapping中的路径有重复!如:愿你眼中有光芒,活成你想要的模样转载 2019-08-28 23:19:02 · 4174 阅读 · 0 评论 -
Mybatis 返回插入的数据的id
1.mapper.xml keyProperty="id" useGeneratedKeys="true" keyColumn="id"这样就行了2.取出来 直接用实体类的get方法就能取出来了原创 2019-08-03 10:29:18 · 83 阅读 · 0 评论 -
玩转SpringBoot之定时任务详解
阅读目录:序言 一、静态:基于注解 二、动态:基于接口 三、多线程定时任务阅读正文:回到顶部序言使用SpringBoot创建定时任务非常简单,目前主要有以下三种创建方式:一、基于注解(@Scheduled) 二、基于接口(SchedulingConfigurer) 前者相信大家都很熟悉,但是实际使用中我们往往想从数据库中读取指定时间来动态执行定时任务,这时候基于...原创 2019-07-17 10:16:08 · 101 阅读 · 0 评论 -
在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 评论 -
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 · 1327 阅读 · 1 评论 -
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 · 1884 阅读 · 0 评论 -
spring-boot------------------异步,定时任务
异步1.在方法上标注 @Async//告诉spring 这是一个异步方法2.在启动器上标注 @EnableAsync//开启异步注解定时任务1.在方法上标注 @Scheduled2.在启动器上标注 @Scheduled//开启异步注解...原创 2019-07-28 21:58:46 · 89 阅读 · 0 评论 -
关于ssm框架提示400的错误
当页面报400时,1.是参数有问题2.传递的参数为日期,spring不知道该以什么格式转换为Date类型,解决办法为在实体类的日期属性上加上@DateTimeFormat(pattern="yyyy-MM-dd")注解即可3.方法在返回值类型前没有加@RequestBody注解 或者将实体类的date类型改伟String...原创 2019-02-15 20:51:53 · 614 阅读 · 0 评论