摘要: 在制作项目中发现数据库中的datetime读取出来后显示出的时间不利于查看 于是在浏览多篇文章后,在这里总结一下 使用#dates.format来解决 <span th:text="${#dates.format(user.date, 'yyyy-MM-dd')}">4564546</span> 或 阅读全文
posted @ 2020-08-04 16:03 可达鸭给我冲鸭 阅读(1171) 评论(0) 推荐(0) 编辑
摘要: java文档的注释标签 1、常用Java注释标签(Java comment tags) @author 作者 @param 输入参数的名称 说明 @return 输出参数说明 @since JDK版本 @version 版本号 @see 链接目标 @throws 异常 @deprecated 标注弃 阅读全文
posted @ 2020-07-20 16:34 可达鸭给我冲鸭 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 开发工具:IntelliJ IDEA、Tomcat9.0、 jdk1.8 JS插件:juqery,bootstrap 解决办法: 第一步:修改 D:\Tomcat9.0.14\conf\server.xml,添加 URIEncoding="UTF-8" 第二步:修改D:\Tomcat9.0.14\b 阅读全文
posted @ 2020-07-17 15:18 可达鸭给我冲鸭 阅读(930) 评论(0) 推荐(0) 编辑
摘要: 说起配置404,大家应该都会到web.xml中去配置。 <error-page> <error-code>404</error-code> <location>/404.html</location> </error-page> 可当遇到我有业务需求,要记录下相关的信息,或者说404的展示页面有动态 阅读全文
posted @ 2020-07-16 16:31 可达鸭给我冲鸭 阅读(485) 评论(0) 推荐(0) 编辑
摘要: 对Java对象序列化操作时,发现JSON(使用阿里巴巴的FastJSON组件)数据中,包含“$ref”结构数据; 这个是为了避免触发 StackOverflowError 错误而做的处理。 可以使用JSON.toJSONString(list, SerializerFeature.DisableCi 阅读全文
posted @ 2020-07-13 15:45 可达鸭给我冲鸭 阅读(319) 评论(1) 推荐(0) 编辑
摘要: 在juqery1.9之前使用live()方法进行绑定,之后使用on()方法,如下: HTML代码: <ul class="newslist_left_title_bt"> <li class="newslist_opt_for"><span><a href="">最新文章</a></span></l 阅读全文
posted @ 2020-07-13 10:42 可达鸭给我冲鸭 阅读(148) 评论(0) 推荐(0) 编辑
摘要: /*删除地址栏中,指定的参数名*/ function delParam(paramKey) { var url = window.location.href; //页面url var urlParam = window.location.search.substr(1); //页面参数 var be 阅读全文
posted @ 2020-07-06 16:14 可达鸭给我冲鸭 阅读(4057) 评论(0) 推荐(0) 编辑
摘要: 使用的Spring+SpringMvc+Mybatis。 想把一个时间对象用ajax的方式传入到前端,但是获取到的值是时间戳。 不想写太多复杂的转换,可以使用注解直接解决。 需要导入fastjson的包。 直接在entity类中的时间对象上面写上注解@JSONField(format = "yyyy 阅读全文
posted @ 2020-07-03 10:36 可达鸭给我冲鸭 阅读(1568) 评论(0) 推荐(0) 编辑
摘要: 1、在shiro的配置文件中配置。 <!-- 会话管理器 --> <bean id="sessionManager" class="org.apache.shiro.web.session.mgt.DefaultWebSessionManager"> <!-- 设置超时时间 --> <propert 阅读全文
posted @ 2020-06-23 16:35 可达鸭给我冲鸭 阅读(2239) 评论(0) 推荐(0) 编辑
摘要: 搜狐IP地址查询接口(可设置编码):http://pv.sohu.com/cityjson?ie=utf-8 下面是使用方法: <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script> <script type="text/javasc 阅读全文
posted @ 2020-06-19 09:44 可达鸭给我冲鸭 阅读(843) 评论(0) 推荐(0) 编辑
摘要: truncate table table_name; 当中的‘table_name’为需要归零的表。 还可以删除表的主键,重新创建一个主键。 阅读全文
posted @ 2020-06-18 10:13 可达鸭给我冲鸭 阅读(331) 评论(0) 推荐(0) 编辑
摘要: SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");//格式化规则 Date date = byId.getCreationTime();//获得要处理的时间 Date型 String strDate= sdf.format(date) 阅读全文
posted @ 2020-06-11 17:38 可达鸭给我冲鸭 阅读(8121) 评论(0) 推荐(0) 编辑
摘要: 在Spring—Mvc的xml文件中添加: <!-- thymeleaf模板--> <bean id="templateResolver" class="org.thymeleaf.spring4.templateresolver.SpringResourceTemplateResolver"> < 阅读全文
posted @ 2020-06-10 14:44 可达鸭给我冲鸭 阅读(860) 评论(0) 推荐(0) 编辑
摘要: <a th:href="${#httpServletRequest.getContextPath()}"></a> 如Web项目名称为Demo,那么${#httpServletRequest.getContextPath()}获取到的值为Demo 阅读全文
posted @ 2020-06-10 14:41 可达鸭给我冲鸭 阅读(1711) 评论(0) 推荐(0) 编辑
摘要: .zxbm_xf{ position: fixed; z-index: 999; left: 0; top: 0; bottom: 0; right: 0; margin:auto; } 这样DIV元素就可以在页面居中显示了 阅读全文
posted @ 2020-06-01 14:08 可达鸭给我冲鸭 阅读(1324) 评论(0) 推荐(0) 编辑
摘要: <textarea style="resize:none;"></textarea> 在默认情况下,我们可以发现textarea右下角可以进行拖动,这样容易破坏已经设计好的页面样式,想要设置不可拖动,添加如上代码即可 阅读全文
posted @ 2020-06-01 11:28 可达鸭给我冲鸭 阅读(1255) 评论(0) 推荐(0) 编辑
摘要: window.open(http://wwww.oufens.com,"","width=200,height=200") 阅读全文
posted @ 2020-05-21 15:05 可达鸭给我冲鸭 阅读(1544) 评论(0) 推荐(0) 编辑
摘要: 简介 有的页面在向下滚动的时候,有些元素会产生细小的动画效果。虽然动画比较小,但却能吸引你的注意。比如刚刚发布的 iPhone 6 的页面(查看)。如果你希望你的页面也更加有趣,那么你可以试试 WOW.js。 WOW.js 依赖animate.css ,所以它支持 animate.css 多达 60 阅读全文
posted @ 2020-05-18 17:18 可达鸭给我冲鸭 阅读(439) 评论(0) 推荐(0) 编辑
摘要: 1 ::-webkit-input-placeholder { /* WebKit browsers */ 2 color: #999; } 3 :-moz-placeholder { /* Mozilla Firefox 4 to 18 */ 4 color: #999; } 5 ::-moz-p 阅读全文
posted @ 2020-05-18 10:55 可达鸭给我冲鸭 阅读(636) 评论(0) 推荐(0) 编辑
摘要: $(document).ready(function(){}).keydown(function (e) { if (e.which 27){ //自定义逻辑 } }); 阅读全文
posted @ 2020-05-13 17:27 可达鸭给我冲鸭 阅读(3473) 评论(0) 推荐(1) 编辑
摘要: 当内部元素全部使用浮动的时候,div不会自动适应高度 如下 .Professional_box{/*此时div不会自动适应高度*/ width: 100%; height: auto; } 此时发现容器没有高度。 修改后 .Professional_box{ width: 100%; height: 阅读全文
posted @ 2020-05-13 11:42 可达鸭给我冲鸭 阅读(658) 评论(0) 推荐(0) 编辑
摘要: /** * @return {boolean} */ function IsEmail(str) { var reg = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/; return reg.test(str); } 阅读全文
posted @ 2020-05-09 09:58 可达鸭给我冲鸭 阅读(5231) 评论(0) 推荐(0) 编辑
摘要: /** * @return {boolean} */ function IsCard(str) { var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; return reg.test(str); } 阅读全文
posted @ 2020-05-09 09:57 可达鸭给我冲鸭 阅读(21641) 评论(0) 推荐(0) 编辑
摘要: /** * @return {boolean} */ function IsAge(str) { var age = parseInt(str); let pattern = /^(([0-9]|[1-9][1-9]|1[0-7][0-9])(\\.[0-9]+)?|180)$/; return p 阅读全文
posted @ 2020-05-09 09:56 可达鸭给我冲鸭 阅读(5716) 评论(2) 推荐(0) 编辑
摘要: /** * @return {boolean} */ function IsSex(str) { var pattern = new RegExp("[/^男$|^女&/]"); return pattern.test(str); } 阅读全文
posted @ 2020-05-09 09:54 可达鸭给我冲鸭 阅读(3153) 评论(0) 推荐(0) 编辑
摘要: /** * @return {boolean} */ function Isphone(str) { var phone = parseInt(str); let pattern = /^[1][3,4,5,7,8][0-9]{9}$/; return pattern.test(phone); } 阅读全文
posted @ 2020-05-09 09:52 可达鸭给我冲鸭 阅读(1150) 评论(0) 推荐(0) 编辑
摘要: function stripscript(str){ var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"); return pattern.test(str); } 阅读全文
posted @ 2020-05-08 15:53 可达鸭给我冲鸭 阅读(5382) 评论(0) 推荐(1) 编辑
摘要: 1、使用@media (max-width:640px)时,要从大到小的顺序排放,例如: @media (max-width: 640px) { .newslist_text h5{ font-size: 22px; } } @media (max-width: 510px) { .newslist 阅读全文
posted @ 2020-04-30 11:54 可达鸭给我冲鸭 阅读(1729) 评论(0) 推荐(0) 编辑
摘要: <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> 其中 width:viewport 的宽度,可以 阅读全文
posted @ 2020-04-28 14:09 可达鸭给我冲鸭 阅读(1130) 评论(0) 推荐(0) 编辑
摘要: function mobileskip(url) { var mobileAgent = new Array("iphone", "ipod", "ipad", "android", "mobile", "blackberry", "webos", "incognito", "webmate", " 阅读全文
posted @ 2020-04-28 10:43 可达鸭给我冲鸭 阅读(1367) 评论(0) 推荐(0) 编辑