`
bask
  • 浏览: 144259 次
  • 性别: Icon_minigender_1
  • 来自: 宇宙
社区版块
存档分类
最新评论
文章列表
(1)修改tomcat/conf/server.xml <Connector port="8080" URIEncoding="utf-8"/> (2)web.xml使用spring CharacterEncodingFilter <filter> <filter-name>encodingFilter</filter-name> <filter-class> org.springframework.web.filter.CharacterEncodingFilter < ...
@Cache --Hibernate二级缓存 @Entity @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) @Table(name="promotion_info") public class Promotion implements Serializable { //... } 在使用@Cache的时候需要配置ehcache.xml 如下: <?xml version="1.0" encoding="UTF-8"?> ...
Tomcat从5.5版本开始,支持以下四种Connector的配置分别为: <Connector port="8081" protocol="org.apache.coyote.http11.Http11NioProtocol"                           connectionTimeout="20000" redirectPort="8443"/> <Connector port="8081" protocol="HTTP/1.1" ...
1.出现 java.util.ConcurrentModificationException 时的解决办法 //(1) 根据某个id直接删除全部(如果数据库中的多对多关系) Set<Largess> largessSet = promotion.getLargess(); largessSet.clear(); //或者 for(Iterator it = largessSet.iterator();it.hasNext();) { Largess largess = (Largess)it.next(); it.remove();//先移除 largessS ...
1.button的setDefaultFormProcessing(false)方法可以在表单提交的时候只调用button的onSubmit方法, 当true的情况将先调用form的onSubmit方法再调用button的onSubmit方法,默认为true。 2.在需要的时候增加js public class JQueryValidateBehavior extends AbstractBehavior { private static final ResourceReference JQUERY_VALIDATE = new JavascriptResourceRefernce(JQ ...
此例子也是根据人家修改的 呵呵 公共的css <style type="text/css"> ul,li{margin:0;padding:0} #scrollDiv{width:800px;height:100px;line-height:25px;border:#ccc 1px solid;overflow:hidden} #scrollDiv li{height:25px;padding-left:10px;} </style> 公共的html <div id="scrollDiv"> <u ...

打印日历格式

package cn.com.test; import java.util.Calendar; import static java.lang.System.out; public class Demo { static String[] MONTH = new String[]{"一月","二月","三月","四月","五月","六月","七月","八月","九月","十月" ...
1.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class 问题:主要出现在表映射上面,没有关联起来 1> 在配置文件(applicationContext.xml)里没有加入com.bask.model.PromotionItem会出现这个问题 2> 如下: @Entity @Table(name="promotion") public class Promotion implements Serializable { @OneToMany(map ...
1. web.xml 配置 <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/applicationContext.xml <!--classpath*:/spring-config/applicationContext.xml--> </param-value> </context-param> <!-- hibernate open ses ...
@Entity --声明为一个实体bean @Table(name="promotion_info") --为实体bean映射指定表(表名="promotion_info) @Id --声明了该实体bean的标识属性 @GeneratedValue --可以定义标识字段的生成策略. @Transient --将忽略这些字段和属性,不用持久化到数据库 @Column(name="promotion_remark")--声明列(字段名="promotion_total") ...
<script> var j=0//全局使用 jQuery(function ($) { //加载触发 $("input[@type='checkbox']").each(function() { if($(this).attr("checked")) { j++; } else { j--; } $("#count").html(""+j); }); $("# ...
Global site tag (gtag.js) - Google Analytics