java开发实战(第三十天)

  1. 1. 数据库
  2. 2. 层次

数据库

数据库实体的抽象
编写对应的数据库表
编写pojo程序

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.white.pojo;

public class user {
private Integer id;
private String username;
private String password;
private String call;

public Integer getId() {
return id;
}

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

public String getUsername() {
return username;
}

public void setUsername(String username) {
this.username = username;
}

public String getPassword() {
return password;
}

public void setPassword(String password) {
this.password = password;
}

public String getCall() {
return call;
}

public void setCall(String call) {
this.call = call;
}

@Override
public String toString() {
return "user{" +
"id=" + id +
", username='" + username + '\'' +
", password='" + password + '\'' +
", call='" + call + '\'' +
'}';
}

public user() {

}

public user(Integer id, String username, String password, String call) {
this.id = id;
this.username = username;
this.password = password;
this.call = call;
}
}

层次

不同层次有不同的包
web层
com.white.web/servlet/controller
service册
com.white.service service接口包
com.white.service.impl service接口实现类
dao持久层
com.white.dao Dao接口包
com.white.dao.impl Dao接口包
实体bean对象
com.white.pojo/entity/domain/bean javabear类
测试包
com.white.text/junit
工具类
com.white.utils