
错误总结
会飞的小猪象
从点滴做起。
展开
-
mybatis-gegerator自定义注释
1、mybatis-generator默认的注释 <!-- 两个 suppress 的注释建议不要去除,否则多次生成的xml是追加模式 --> <commentGenerator> <property name="suppressAllComments" value="false"/> <property name="sup...原创 2020-03-18 18:05:05 · 684 阅读 · 0 评论 -
@Schedule定时任务并行(异步)处理
最近项目中遇到一个问题 , 在SpringBoot中设置了定时任务之后 , 在某个点总是没有执行 . 经过搜索研究发现 , spring 定时器任务scheduled-tasks默认配置是单线程串行执行的 . 即在当前时间点之内 . 如果同时有两个定时任务需要执行的时候 , 排在第二个的任务就必须等待第一个任务执行完毕执行才能正常运行.如果第一个任务耗时较久的话 , 就会造成第二个任务不能及时执行...转载 2019-01-10 10:48:20 · 3803 阅读 · 0 评论 -
SpringBoot中JavaMailSender发送附件以及遇到的问题
项目中有一个需求,需要给内部用户邮箱发送附件,直接贴代码:public void sendAnnex(List<String> to, String fileName, String title, String text, ByteArrayOutputStream os){ //防止中文名字 base64加密以后 名字太长被截断 导致中文乱码问题 ...原创 2018-11-23 11:54:46 · 4568 阅读 · 1 评论 -
WebMvcConfigurationSupport 静态资源失效问题
WebMvcConfigurationAdapter 在spring boot 2.0被废弃以后,可以使用系提供的类:WebMvcConfigurationSupport,来替换之前的WebMvcConfigurationAdapter 。 但是替换之后之前的静态资源文件 会被拦截,导致无法可用。解决办法:重写 addResourceHandlers()方法,加入静态文件路径即可...原创 2018-10-08 16:56:35 · 5027 阅读 · 0 评论 -
No qualifying bean of type 'com.example.miaosha.dao.UserDao' available: expected at least 1 bean whi
今天新建一个spring boot + mybatis 项目的时候,注解加的都没有问题,但是一直报一个错: 试了各种方法,但是还是一直报错,后来检查配置文件发现: 这这个依赖冲突了,导致service在注入dao的时候找不到一个唯一的bean,所以会一直报错,将下面的依赖删掉再运行就可以了。...原创 2018-09-29 11:14:26 · 4818 阅读 · 0 评论 -
tomcat启动时错误:Failed to start component [StandardEngine[Catalina].StandardHost[localhost].错误
tomcat启动时错误:Failed to start component [StandardEngine[Catalina].StandardHost[localhost].错误我是直接把tomcat删除了重新添加的,就好了原创 2018-09-19 16:26:32 · 257 阅读 · 0 评论 -
新建spring boot用maven install报错
一、报错maven Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10 修改pom.xml: <build> <plugins> <plugin> <groupId>org.apa...原创 2018-07-24 20:22:32 · 1001 阅读 · 0 评论 -
mysql用逗号分割字符串
这是我的表结构,需要分割的就是KEY的值 采用的是mysql的substring_index函数: select a.ID,a.DOCTORID, substring_index(substring_index(a.`KEY`,',',b.help_topic_id+1),',',-1) as key1 from doctora...原创 2018-07-11 12:39:27 · 6815 阅读 · 0 评论 -
SVN更新时,报 This client is too old to work with working copy…错误
昨天检出的项目,今天本想更新一下 ,结果svn直接报错,svn: This client is too old to work with working copy ‘/opt/gforge/www/account’. You needto get a newer Subversion client, or to downgrade this working copy.See http://subv...原创 2018-07-03 09:48:13 · 1121 阅读 · 1 评论 -
spring boot项目打包没问题 运行报错
今天新建出一个spring boot项目,打包没有问题,但是运行报错。可以尝试按照这个来修改:项目右键->Project Structure 将所有的Provided(私有化) 改为 compile(编译);...原创 2018-06-27 16:20:03 · 1522 阅读 · 0 评论