摘要: #设置虚拟目录(application.properties)spring.resources.static-locations=file:e:\\upload# 单个文件的最大值 spring.servlet.multipart.max-file-size=1MB # 单次请求最大值 spring 阅读全文
posted @ 2020-10-12 14:30 奶牛花花 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 为什么将图片上传到项目下? 因为不上传到项目下,页面上无法显示上传的图片 配置tomcat的虚拟目录 D:\apache-tomcat-8.5.40\conf\server.xml path的作用:浏览器访问项目的名称 docBase的作用:设置的虚拟目录的路径,以后浏览器就可以访问该目录下的图片 阅读全文
posted @ 2020-09-26 16:46 奶牛花花 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1.引入 layui 的配置文件 2.java代码 @RequestMapping("select") @ResponseBody public Map select(int page,@RequestParam("limit") int Size){ PageInfo<City> pi = cs. 阅读全文
posted @ 2020-09-23 20:03 奶牛花花 阅读(927) 评论(0) 推荐(1) 编辑
摘要: 当jsp中有比较复杂的逻辑时,我们会在jsp中很多java代码,这样会让jsp的结构看起来很乱。jstl可以解决这个问题。但是jstl里面的标签的数量是有限的。当我们需要更复杂的逻辑时就需要自己去定义标签。 使用自定义标签有三个步骤: 定义标签类 对标签类进行配置。 在jsp中使用该标签。 具体步骤 阅读全文
posted @ 2020-09-15 19:51 奶牛花花 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 新建一个类,实现 HandlerInterceptor 接口 import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.ModelAndView; import 阅读全文
posted @ 2020-09-07 15:02 奶牛花花 阅读(926) 评论(0) 推荐(0) 编辑
摘要: 首先加入必须的依赖 <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.3.3</version> </dependency> jsp页面 阅读全文
posted @ 2020-09-06 20:50 奶牛花花 阅读(151) 评论(0) 推荐(0) 编辑
摘要: SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); String format = simpleDateFormat.format(new Date()); System.out.println(format 阅读全文
posted @ 2020-09-06 20:05 奶牛花花 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 从数据库读上来的时间在json中显示成birthday":{"date":18,"day":4,"hours":0,"minutes":0,"month":6,"seconds":0,"time":490464000000,"timezoneOffset":-480,"year":85}其中 "ti 阅读全文
posted @ 2020-08-30 14:37 奶牛花花 阅读(663) 评论(0) 推荐(0) 编辑
摘要: frameset 框架集 border 设置框架的边框粗细。 rows 横向分割页面。数值表示方法与意义与cols相同。 framespacing 设置框架与框架间的保留的空白距离。 注意1: cols与rows两属性尽量不要同在一个<frameset>标签中使用。若要实现下图架构,代码正确写法为: 阅读全文
posted @ 2020-08-29 12:23 奶牛花花 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 在idea中有些方法未引用会变成灰色的,这样看着很不舒服 所以...... 阅读全文
posted @ 2020-08-26 17:21 奶牛花花 阅读(5891) 评论(0) 推荐(0) 编辑