MyEclipse下SSH2框架搭建(5)

2019-03-22 08:58

xmlns:xsi=\ xmlns:aop=\

xsi:schemaLocation=\

xmlns:context=\ xmlns:tx=\

http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/aop

http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/tx

http://www.springframework.org/schema/tx/spring-tx-2.5.xsd\ default-autowire=\ default-lazy-init=\>

class=\>

class=\>

classpath:hibernate.cfg.xml

05. 用到了spring的aop,因此我们把spring的aop的jar包aspectjrt.jar和aspectjweaver.jar

加入到lib目录。spring没有开发自己的aop的jar包,它也是利用别人已经开发好的jar包aspectjrt.jar和aspectjweaver.jar。

06. 新建com.oa.model,如图所示。

新建Package

07. 在com.oa.model下新建一个Person的类,如图所示。

Name写入Person

08. 配置Person.java,如图所示。 Java代码

package com.oa.model; public class Person { private int id; private String name; private String sex; private String address;

private String duty; private String phone; private String description; public int getId() { return id; }

public void setId(int id) { this.id = id; }

public String getName() { return name; }

public void setName(String name) { this.name = name; }

public String getSex() { return sex; }

public void setSex(String sex) { this.sex = sex; }

public String getAddress() { return address; }

public void setAddress(String address) { this.address = address; }

public String getDuty() { return duty; }

public void setDuty(String duty) { this.duty = duty; }

public String getPhone() { return phone; }

public void setPhone(String phone) { this.phone = phone; }

public String getDescription() { return description; }

public void setDescription(String description) { this.description = description; } }

09. 在com.oa.model包下新建Person.hbm.xm映射文件,如图所示。


MyEclipse下SSH2框架搭建(5).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:集装箱的种类 - 附实图

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: