package com.springmvc.entity;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
/**
* Teac entity. @author MyEclipse Persistence Tools
*/
@Entity
@Table(name = "teac", catalog = "mybatis_study")
public class Teac implements java.io.Serializable {
// Fields
private Integer tid;
private String tname;
private Integer tage;
private Set<Stus> stuses = new HashSet<Stus>(0);
// Constructors
/** default constructor */
public Teac() {
}
/** minimal constructor */
public Teac(String tname, Integer tage) {
this.tname = tname;
this.tage = tage;
}
/** full constructor */
public Teac(String tname, Integer tage, Set<Stus> stuses) {
this.tname = tname;
this.tage = tage;
this.stuses = stuses;
}
// Property accessors
@Id
@Column(name = "tid", unique = true, nullable = false)
public Integer getTid() {
return this.tid;
}
public void setTid(Integer tid) {
this.tid = tid;
}
@Column(name = "tNAME", nullable = false, length = 20)
public String getTname() {
return this.tname;
}
public void setTname(String tname) {
this.tname = tname;
}
@Column(name = "tage", nullable = false)
public Integer getTage() {
return this.tage;
}
public void setTage(Integer tage) {
this.tage = tage;
}
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "teac")
public Set<Stus> getStuses() {
return this.stuses;
}
public void setStuses(Set<Stus> stuses) {
this.stuses = stuses;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
springmvc+spring+hibernate适合新手入门
共112个文件
jar:74个
class:7个
java:7个
5星 · 超过95%的资源 需积分: 14 43 下载量 99 浏览量
2016-07-14
17:23:47
上传
评论 2
收藏 20.92MB RAR 举报
温馨提示
最近入职一家公司,使用的 是springmvc框架,之前公司是用的struts2没接触过springmvc,所以这几天学习了一下并写了一个简单的基于注解的demo,数据库用的mysql,就两张表,有外键关联,demo实现了两张表的级联增删改查,数据库文件也在里面,希望能帮助到和我一样的人
资源推荐
资源详情
资源评论
收起资源包目录
springmvc+spring+hibernate适合新手入门 (112个子文件)
Teac.class 2KB
ITeacServiceImpl.class 2KB
TeacController.class 2KB
Stus.class 2KB
ITeacDaoImpl.class 2KB
ITeacService.class 409B
ITeacDao.class 363B
.classpath 7KB
org.eclipse.wst.common.component 465B
org.eclipse.wst.jsdt.ui.superType.container 49B
hibernate3.jar 2.31MB
com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar 1.57MB
jbosscache-core-3.1.0.GA.jar 1.1MB
spring-core-3.2.0.RELEASE.jar 843KB
spring-context-3.2.0.RELEASE.jar 834KB
mysql-connector-java-5.1.21-bin.jar 809KB
jboss-cache-1.4.1.GA.jar 690KB
org.springframework.context-3.0.5.RELEASE.jar 653KB
spring-webmvc-3.2.0.RELEASE.jar 621KB
spring-web-3.2.0.RELEASE.jar 610KB
c3p0-0.9.1.jar 594KB
spring-beans-3.2.0.RELEASE.jar 591KB
javassist-3.9.0.GA.jar 583KB
commons-collections-3.1.jar 546KB
org.springframework.beans-3.0.5.RELEASE.jar 542KB
proxool-0.8.3.jar 465KB
spring-test-3.2.0.RELEASE.jar 441KB
antlr-2.7.6.jar 433KB
org.springframework.web.servlet-3.0.5.RELEASE.jar 409KB
jstl-1.2.jar 405KB
spring-jdbc-3.2.0.RELEASE.jar 392KB
com.springsource.org.apache.log4j-1.2.15.jar 387KB
org.springframework.web-3.0.5.RELEASE.jar 386KB
standard-1.1.2.jar 384KB
spring-orm-3.2.0.RELEASE.jar 383KB
org.springframework.jdbc-3.0.5.RELEASE.jar 377KB
org.springframework.core-3.0.5.RELEASE.jar 373KB
log4j-1.2.14.jar 359KB
spring-aop-3.2.0.RELEASE.jar 327KB
org.springframework.orm-3.0.5.RELEASE.jar 326KB
com.springsource.net.sf.cglib-2.2.0.jar 319KB
org.springframework.aop-3.0.5.RELEASE.jar 314KB
dom4j-1.6.1.jar 307KB
com.springsource.org.apache.commons.httpclient-3.1.0.jar 301KB
hibernate-annotations.jar 273KB
cglib-2.2.jar 272KB
com.springsource.org.codehaus.jackson.mapper-1.0.0.jar 264KB
spring-tx-3.2.0.RELEASE.jar 235KB
org.springframework.transaction-3.0.5.RELEASE.jar 226KB
ehcache-1.2.3.jar 203KB
spring-jms-3.2.0.RELEASE.jar 196KB
spring-expression-3.2.0.RELEASE.jar 189KB
spring-webmvc-portlet-3.2.0.RELEASE.jar 184KB
org.springframework.jms-3.0.5.RELEASE.jar 181KB
org.springframework.web.portlet-3.0.5.RELEASE.jar 171KB
org.springframework.expression-3.0.5.RELEASE.jar 166KB
spring-context-support-3.2.0.RELEASE.jar 124KB
hibernate-entitymanager.jar 116KB
oscache-2.1.jar 112KB
commons-dbcp-1.2.jar 105KB
spring-oxm-3.2.0.RELEASE.jar 71KB
persistence.jar 69KB
spring-aspects-3.2.0.RELEASE.jar 68KB
hibernate-commons-annotations.jar 65KB
hibernate-validator.jar 61KB
commons-logging-1.1.3.jar 61KB
com.springsource.org.apache.commons.logging-1.1.1.jar 60KB
org.springframework.oxm-3.0.5.RELEASE.jar 60KB
com.springsource.org.apache.commons.fileupload-1.2.0.jar 53KB
org.springframework.asm-3.0.5.RELEASE.jar 52KB
ejb3-persistence.jar 49KB
commons-pool.jar 41KB
spring-struts-3.2.0.RELEASE.jar 35KB
org.springframework.aspects-3.0.5.RELEASE.jar 35KB
org.springframework.web.struts-3.0.5.RELEASE.jar 31KB
swarmcache-1.0RC2.jar 30KB
slf4j-api-1.5.8.jar 23KB
jta-1.1.jar 13KB
spring-instrument-tomcat-3.2.0.RELEASE.jar 10KB
slf4j-log4j12-1.5.8.jar 9KB
spring-instrument-3.2.0.RELEASE.jar 7KB
org.springframework.instrument.tomcat-3.0.5.RELEASE.jar 6KB
com.springsource.org.aopalliance-1.0.0.jar 5KB
org.springframework.instrument-3.0.5.RELEASE.jar 2KB
Teac.java 2KB
Stus.java 1KB
ITeacServiceImpl.java 1KB
TeacController.java 1KB
ITeacDaoImpl.java 908B
ITeacService.java 338B
ITeacDao.java 316B
.jsdtscope 500B
list.jsp 778B
upd.jsp 592B
add.jsp 552B
MANIFEST.MF 36B
.myhibernatedata 532B
.mymetadata 300B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.jdt.core.prefs 395B
共 112 条
- 1
- 2
资源评论
- N0V3L2018-07-06您好 数据库文件在哪呢 没有呀
高级菜鸟人
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功