spring
allenChenZhiMing
这个作者很懒,什么都没留下…
展开
-
Spring aop是报错Error creating bean with name
部分报错信息为: 警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'duke' defined ...原创 2018-07-29 14:51:17 · 2988 阅读 · 1 评论 -
Maven下org.junit.Test无法使用
我在看Spring in action(第四版)的时候,看到了5.2.1测试控制器这一个部分的时候发现无法导入org.junit.Test和assertEquals。 代码的情况 就是这样子,查看了一下自己的pom.xml文件,发现这里的多了一行<scope>test</scope> <dependency> <groupId>j...原创 2018-08-04 17:20:22 · 3591 阅读 · 1 评论 -
spring mvc 上传文件和表单时报400错误
bug复现 代码 这是html的代码,用的是所有的设置看起来都是正确的。 <form action="http://localhost:8081/student/both" method="POST" enctype="multipart/form-data"> stuId: <input type="text" name="stuId"/>&原创 2018-08-09 16:36:57 · 1082 阅读 · 1 评论 -
spring mvc 下载文件 406错误
情况复现 1.Controller的代码,首先确定这个代码没有问题,因为在别的地方测试过。但是今天死活都是406,后台测试看有没有跑代码发现也没有。 @Controller @RequestMapping(value = "/" + UserService.OBSERVER, produces = "text/html;charset=UTF-8") @CrossOrigin(origins...原创 2018-08-24 12:25:01 · 1335 阅读 · 0 评论