JAVA framework XML file

In fact, the configuration servlet in JAVA development, the mapping injection configuration, etc., can be configured with xml

department here is the name of the entity class, rather than the name of the corresponding database table

Field names of the database table = {#} entity class attribute name

Reverse engineering has generated XML file to find updates and other functions, but when we need to return to find a class,

We should write to return at the beginning of the results resultMap id = "themselves from the name" type = "result type returned here for the Department entity class."

 <Id property = "entity class primary key name" column = "database field name corresponding to" javaType = "String type field is" />

 <Result property = "name of the entity corresponding to the primary key of the class" column = "database field name corresponding to" javaType = "String type field is" />
 <Delete id = "dao layer corresponding to the method name" parameterType = "String corresponding to the type of parameter passing">
 <select id="dao层对应的方法名" parameterType="String对应传参的类型" resultMap="对应返回的类型为Department,因为刚刚已经对此处的Deparement起别名为department了,而且设置了返回类型等<result property="非主键对应实体类的名字" column="数据库对应字段名" javaType="String也就是字段的类型">等等的操作  >
业务层biz看起来和持久层dao没太大区别,业务层写了接口,持久层定义方法,但是当我们遇到了报销单等复杂的处理时,业务层的功效显示出来了
业务层实现层IMPL继承业务层,他会实现持久层的代码

Guess you like

Origin www.cnblogs.com/almm/p/11241636.html