
E-learning
sunhuwh
求学阶段
展开
-
Project facet Java version 1.7 is not supported
eclipse报错;Project facet Java version 1.7 is not supported这是在给项目添加原创 2014-05-07 18:44:15 · 2380 阅读 · 0 评论 -
用State模式减少if..elseif语句
这种方式可以适用于很多场合,原创 2014-05-08 00:09:23 · 777 阅读 · 0 评论 -
<aop:aspectj-autoproxy/>
报错:Multiple annotations found at this line: - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'aop:aspectj-autoproxy'. - schema_referen原创 2014-05-07 18:44:23 · 9039 阅读 · 1 评论 -
check the manual that corresponds to your MySQL server version for the right syntax to use near '..'
[School InFormatization -->]-->ERROR{SchemaUpdate.java:212}-Unsuccessful: create table group (id bigint not null auto_increment, createTime datetime, updateTime datetime, primary key (id)) ENGINE=Inno原创 2014-05-08 17:36:22 · 9243 阅读 · 0 评论 -
Hibernate lazy
hibernate3.0中lazy有三个值,true,false,proxy,默认的是lazy="proxy".具体设置成什么要看你的需求,并不是说哪个设置就是最好的。假如在student对象中包含一个head对象如果你确定在用student对象的时候就要用到head对象里的属性,那你就设置立即加载,因为设置立即加载那么在查询student的同时就会查询student的head,hib原创 2014-05-08 17:36:28 · 743 阅读 · 0 评论 -
论坛功能实现难点分页
由于论坛发帖和分页形式都是这样的:原创 2014-05-17 03:42:06 · 1793 阅读 · 0 评论 -
Caused by: org.hibernate.MappingException: collection foreign key mapping has wrong number of column
模型创建错误,这个是由于继承时没注意到已经原创 2014-05-08 17:36:10 · 2475 阅读 · 0 评论 -
jquery validate maxlength汉字及hibernate regexp
maxlength:5 输入长度最多是5的字符串(汉字算一个字符)原创 2014-05-09 17:27:46 · 3500 阅读 · 0 评论 -
论坛功能实现大概思路及URL锚点HTML定位技术机制、应用与问题
论坛回复功能:建模,原创 2014-05-16 01:37:25 · 1970 阅读 · 0 评论 -
替换传统web.xml
Servlet3.0提供了注解(annotation),使得不再需要在web.xml文件中进行Servlet的部署描述,简化开发流程。原创 2014-05-10 02:48:40 · 3053 阅读 · 0 评论 -
自建一个WebApplicationInitializer
昨天的blog中提到,实现WebApplicationinitializer的类都可以被加载原创 2014-05-11 00:15:51 · 12567 阅读 · 1 评论 -
servlet3.0 contextLoadListener和WebAppRootListener
*Listener that sets a system property to the web application root directory. * The key of the system property can be defined with the "webAppRootKey" init * parameter at the servlet context level原创 2014-05-11 00:16:00 · 3948 阅读 · 0 评论 -
WebApplicationInitializer
针对public class DefaultConfigration implements WebApplicationInitializer来想一个问题:为什么实现了WebApplicationInitializer这个类后onStartup方法就会自动执行。原创 2014-05-10 02:47:42 · 13033 阅读 · 0 评论 -
论坛---分页和回复
分页功能暂时先放着,不要分9个原创 2014-05-18 03:38:49 · 1342 阅读 · 0 评论 -
Hibernate 异常org.hibernate.LazyInitializationException: could not initialize proxy - no Session
关于Hibernate lazy,这个一个lazy使用后带来的异常,由于session关闭后引用了对象,而该对象本身是没有被加载。根本就没有加入内存中。我的情况是这样的:给了前端一个对象,该对象中与另一个对象关联着在。而我想在前端使用被引用的对象,丢出了这种异常。所以解决方案分为两种,一个是延时加载禁止掉,第二种办法,在view层使用这些数据时,session是打开的。第一种:原创 2014-05-12 17:34:23 · 987 阅读 · 0 评论 -
Spring配置 <context:component-scan/> <mvc:annotation-driven />
标签。这个标签的原创 2014-05-11 23:36:56 · 9054 阅读 · 1 评论 -
@用法做回复
More than one row with the given identifier was found,hibernate原创 2014-05-19 04:21:20 · 688 阅读 · 0 评论 -
富文本kindeditor
用fckeditor来做富文本。流程:原创 2014-05-20 03:02:26 · 1130 阅读 · 0 评论 -
项目部署时遇到的问题
\org.eclipse.wst.server.core\tmp6\wtpwebapps\e-learning does not exist or is not a readable directory原创 2014-05-07 18:43:38 · 959 阅读 · 0 评论 -
Hql关联多表删除
场景是这样的:原创 2014-05-14 02:40:00 · 4011 阅读 · 0 评论 -
@Servlet配置错误导致view层无法获取关联对象
因为过滤的时候进入的是OpenEntityManagerInViewFilter filterChain.doFilter(request, response);原创 2014-05-13 02:13:55 · 937 阅读 · 0 评论 -
criterial查询(2014-05-29 03:51)续-----Example
关于Example,这个是个比较好的一个原创 2014-06-03 02:31:03 · 1059 阅读 · 0 评论 -
a href带参数传递
@RequestMapping(value = "/{id}",params = {"courseId"},method = RequestMethod.DELETE)原创 2014-05-14 20:05:16 · 33845 阅读 · 1 评论 -
实现:上传图片后再把图片显示到页面上去
kindeditor还是没学好,很多功能都只是原创 2014-05-21 04:09:15 · 26575 阅读 · 6 评论 -
无刷新改变页面内容
原来经常用的是form表单来进行提交,但是提交后会刷新页面,而且有时原创 2014-05-22 00:44:47 · 1515 阅读 · 0 评论 -
Springmvc PropertyEditor实现绑定时的类型转换
public class DataBinderTestModel{ private String username; private boolean bool;//Boolean值测试 private PhoneNumberModel phoneNumber;//String->自定义对象的转换测试 private Date date;//日期类型测试 public String原创 2014-06-04 01:31:42 · 4205 阅读 · 0 评论 -
js获取项目的路径
function getRootPath(){ //获取当前网址,如: http://localhost:8083/uimcardprj/share/meun.jsp var curWwwPath=window.document.location.href; //获取主机地址之后的目录,如: uimcardprj/share/meun.jsp var pathNam原创 2014-05-22 00:45:30 · 731 阅读 · 0 评论 -
Spring--在Bean定义中使用EL
/** * 这个是xml风格注解 */ @Test public void beanXml(){ ApplicationContext ctx = new ClassPathXmlApplicationContext("/beanXml.xml"); String world = ctx.getBean("world",String.class); String hello原创 2014-06-24 00:33:12 · 1604 阅读 · 0 评论 -
SpEL语法
SpEL语法转载 2014-06-24 00:32:48 · 907 阅读 · 0 评论 -
spring aop
package com.boventech.learning.service;/** * 定义目标接口 * @author thinkpad * */public interface IHelloWorldService { public void sayHello();}package com.boventech.learning.serviceImpl;原创 2014-06-25 01:57:42 · 541 阅读 · 0 评论 -
Java Web层框架——JSF、Spring MVC、Stripes、Struts 2、Tapestry和Wicket优缺点
JSF优点:◆Java EE标准,这意味着有很大的市场需求和更多的工作机会◆上手快速并且相对容易◆有大量可用的组件库缺点:◆大量的JSP标签◆对REST和安全支持不好◆没有一个统一的实现。既有SUN的实现,又有Apache的实现——MyFaces。◆国内的OperaMasks还支持AJAX,以及有开发工具支持Spring MVC优点:◆对覆盖绑定(o转载 2014-07-16 02:37:22 · 2904 阅读 · 0 评论 -
ckplayer
${fn:toLowerCase(XX)}fn小写原创 2014-06-05 02:23:15 · 4283 阅读 · 0 评论 -
ajax+springmvc实现C与View之间的数据交流
jQuery.post(url, [data], [callback], [type])url,[data],[callback],[type]String,Map,Function,StringV1.0url:发送请求地址。data:待发送 Key/value 参数。callback:发送成功时回调函数。type:返回内容格式,xml, html, script,原创 2014-05-23 00:44:42 · 1168 阅读 · 0 评论 -
上传Html包
function prepareUpload(uploadFold,size){ uploader=$("#uploadify").uploadify({ 'auto' : false, 'swf' : getRootPath()+'/resources/js/upload/uploadify.swf',原创 2014-06-06 03:47:38 · 1534 阅读 · 0 评论 -
sql join
多对多时有时会用到它:使用情形:A和B多对多,原创 2014-05-24 04:24:18 · 695 阅读 · 0 评论 -
spring @AspectJ
/** * 定义目标接口 * @author thinkpad * */public interface IHelloWorld2Service { public void sayHello2();}原创 2014-06-26 01:01:34 · 656 阅读 · 0 评论 -
spring aspectj JoinPoint
/** * 定义目标接口实现 * @author thinkpad * */public class HelloWorld2ServiceImpl implements IHelloWorld2Service { //使用@Pointcut进行命名切入点声明 @Pointcut(value="execution(* com.boventech..*.HelloWorld2Servic原创 2014-06-27 01:55:35 · 1147 阅读 · 0 评论 -
获取该目录下所有文件
/** * 获取该目录下所有文件 * @param file * @param resultFileNames * @return */ private List ergodic(File file,List resultFileNames){ File[] files = file.listFiles();原创 2014-07-18 23:39:43 · 628 阅读 · 0 评论 -
PPT播放
将ppt转换为一组图片,打包,在网页播放,博原创 2014-07-18 01:09:34 · 1722 阅读 · 0 评论 -
用xls导入数据(报错)
public class UnitInitiallizer implements ApplicationListener{ /** * 避免刷新root-application容器和project-name容器时执行两次代码的类变量 */ private static boolean isStart=false; @Autowired原创 2014-06-08 01:55:48 · 789 阅读 · 0 评论