随笔分类 -  Spring

Spring相关信息
摘要:1 public class DefaultSessionListener implements HttpSessionListener { 2 3 public void sessionCreated(HttpSessionEvent arg0) { 4 5 ApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(arg0.getSession().getServletContext()); 6 IMemberService memberSe... 阅读全文
posted @ 2011-10-11 13:42 为牛马者,背负前行 阅读(3000) 评论(0) 推荐(0)
摘要:到 http://www.uploadify.com/ 去下载 uploadify-v*.*.*.zip,下载后解压,只要除com文件夹外的其它文件,将这些文件放到项目WebRoot任意文件夹下! 阅读全文
posted @ 2011-09-30 11:21 为牛马者,背负前行 阅读(1768) 评论(0) 推荐(0)
摘要:package com.tg.system;import javax.servlet.http.HttpSessionEvent;import javax.servlet.http.HttpSessionListener;import org.springframework.context.ApplicationContext;import org.springframework.web.context.support.WebApplicationContextUtils;import com.tg.module.member.bean.Member;import com.tg.module. 阅读全文
posted @ 2011-09-09 11:14 为牛马者,背负前行 阅读(2736) 评论(0) 推荐(0)
摘要:beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/beans http://www.springframe 阅读全文
posted @ 2011-08-06 13:56 为牛马者,背负前行 阅读(818) 评论(0) 推荐(0)
摘要:数据库中的创建视图就不说了!代码中,创建一个实体类,名要和数据库中的视图名一样字段也要一样,位置可以不相同@Entitypublic class MediaView { @Id private String strId; private Integer intType; private String strTitle; private Integer intState; private Long click; private Long vote; private Long comment; private String memberId; private String strNickName; 阅读全文
posted @ 2011-06-28 16:55 为牛马者,背负前行 阅读(426) 评论(0) 推荐(0)
摘要:媒体表@Entitypublic class Media implements Serializable { ......略 @OneToMany(cascade=CascadeType.REMOVE) @JoinColumn(name = "FK_Media_id",updatable=false) private Set<MediaComment> mediaCommetnSet; // 媒体评论表}媒体评论表@Entitypublic class MediaComment implements Serializable { ......略 @ManyToO 阅读全文
posted @ 2011-05-14 13:13 为牛马者,背负前行 阅读(1746) 评论(0) 推荐(0)
摘要:父类:@Entity @Table(name="tbl_AlbumSuper") @Inheritance(strategy=InheritanceType.SINGLE_TABLE) public class AlbumSuperClass { @Id @Column(length = 32) @GeneratedValue(generator = "system-uuid") @GenericGenerator(strategy = "uuid", name = "system-uuid") private S 阅读全文
posted @ 2011-03-31 15:16 为牛马者,背负前行 阅读(2485) 评论(0) 推荐(0)
摘要:上传文件以流方式判断类型 FILE_TYPE_MAP.put("ffd8ffe000104a464946", "jpg"); //JPEG (jpg) FILE_TYPE_MAP.put("89504e470d0a1a0a0000", "png"); //PNG (png) FILE_TYPE_MAP.put("47494638396126026f01", "gif"); //GIF (gif) FILE_TYPE_MAP.put("49492a00227105008037", "tif"); //TIFF (tif) FILE_TYPE_MAP.put("424d228c010000000000", "bmp"); //16色位图(bmp) FILE_TYPE_MAP.put("424d8240090000000000", "bmp"); //24位位图(bmp) 阅读全文
posted @ 2011-03-24 13:37 为牛马者,背负前行 阅读(13733) 评论(0) 推荐(1)
摘要:在SpringMVC中的Controller想要重写向到某一页可以使用ModelAndViewpublicModelAndView saveAudioReplyMethod(ModelMap map,HttpServletRequest request,AudioReply reply,String audioId){User user=userService.findUserById("1");Audio audio =audioService.findAudio(audioId);replyService.saveAudioReply(reply,audio,user) 阅读全文
posted @ 2011-03-24 13:28 为牛马者,背负前行 阅读(1023) 评论(0) 推荐(0)
摘要:说起上传,相信各位都使用过,这里写的是Spring自带的上传方法,Spring CommonsMultipartResolver 上传文件 阅读全文
posted @ 2011-03-24 13:17 为牛马者,背负前行 阅读(4746) 评论(0) 推荐(0)


如果本页面列出的内容侵犯了您的权益,请告知。
知识共享许可协议
996.icu