eclipse
xujingjingwxxwnx
这个作者很懒,什么都没留下…
展开
-
后台接收图片的文件流,把File类型直接换成InputStream
为什么要这样做?因为这样做就可以不用下面这个转换,提高了效率/** * 把InputStream转为File * @param ins * @param file */private static void inputStreamToFile(InputStream ins,File file) { FileOutputStream os = null; try { os = new FileOutp...原创 2020-08-23 11:20:25 · 627 阅读 · 0 评论 -
ajax将fromdata传递到后台,提示验证码输入错误!后来发现接收的值为null
原因:var shopImg = $("#shop-img")[0].files[0];formdata中含有文件流解决方法:在spring-web.xml中配置<!--文件上传解析器 --> <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <property name="...原创 2020-08-23 11:13:00 · 136 阅读 · 0 评论 -
验证码
SSM框架中使用验证码技术流程:1、在pom.xml中引入 <!-- https://mvnrepository.com/artifact/com.github.penggle/kaptcha --> <dependency> <groupId>com.github.penggle</groupId> <artifactId>kaptcha</artifactId&...原创 2020-08-05 18:05:55 · 198 阅读 · 0 评论 -
js中$.getJSON(initUrl, function(data) 不起作用
html页面缺失数据,先开始检查controller,用地址打开发现数据准确。然后检查js,发现js中$.getJSON(initUrl, function(data) 不起作用。解决办法如下:起初定义的URL地址var initUrl = 'o2o/shopadmin/getshopinitinfo';改为var initUrl = 'http://localhost:8080/o2o/shopadmin/getshopinitinfo';可以进入$.getJSON(initU原创 2020-08-05 16:57:48 · 604 阅读 · 0 评论 -
SSM项目------数据库连接错误
确保pom.xml中的数据库依赖版本与导入的数据库连接jar包一致性 <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.49</version> <scope>...原创 2020-08-04 20:36:25 · 182 阅读 · 0 评论 -
Test source folder ‘src/test/java‘ in project ‘o2o‘ mu...n output folder that is not also used for m
原创 2020-08-01 17:46:05 · 583 阅读 · 0 评论 -
Description Resource Path Location Type Failure to transfer org.apache.maven.plugins:mav
maven项目报错Description Resource Path Location Type Failure to transfer org.apache.maven.plugins:maven-war-plugin:pom:2.2 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the up...原创 2020-07-31 18:37:31 · 547 阅读 · 0 评论 -
Eclipse导入的Maven项目,右击属性没有Build Path
解决方法:修改 Project Facets在 项目右键 -> Properties -> Project Facets ->勾选Java->Apply原创 2020-07-31 18:06:57 · 1073 阅读 · 0 评论