Skip to content

Commit 3f2e656

Browse files
committed
2.1-SNAPSHOT
1 parent 45e625b commit 3f2e656

File tree

87 files changed

+921
-1890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+921
-1890
lines changed

hsweb-web-bean/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## 实体类模块,通用bean,po,和自定义验证器
2+
3+
### 目录结构
4+
5+
```bash
6+
--------src/main/java
7+
---------------------org.hsweb.web.bean
8+
----------------------------common # 通用bean,如增删改查通用参数
9+
------------------------------po # 各个功能的po实体
10+
----------------------------validator # 自定义hibernate-validator
11+
-----------------resources/system
12+
---------------------------------install.sql #首次启动时执行的sql
13+
```
14+
15+
### 说明
16+
po对象都应该继承[GenericPo](src/main/java/org/hsweb/web/bean/po/GenericPo.java)
17+
GenericPo 的泛型为主键的类型,hsweb建议使用String类型,通过createUID()方法手动生成id

hsweb-web-bean/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>hsweb-framework</artifactId>
77
<groupId>org.hsweb</groupId>
8-
<version>2.0-SNAPSHOT</version>
8+
<version>2.1-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>hsweb-web-bean</artifactId>
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
/*
2+
* Copyright 2015-2016 http://hsweb.me
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.hsweb.web.bean.po.system;
18+
19+
public class SystemVersion implements Comparable<SystemVersion> {
20+
public String name;
21+
public String comment;
22+
public String website;
23+
public int majorVersion = 1;
24+
public int minorVersion = 0;
25+
public int revisionVersion = 0;
26+
public boolean snapshot;
27+
28+
public String getName() {
29+
return name;
30+
}
31+
32+
public void setName(String name) {
33+
this.name = name;
34+
}
35+
36+
public String getComment() {
37+
return comment;
38+
}
39+
40+
public void setComment(String comment) {
41+
this.comment = comment;
42+
}
43+
44+
public String getWebsite() {
45+
return website;
46+
}
47+
48+
public void setWebsite(String website) {
49+
this.website = website;
50+
}
51+
52+
public int getMajorVersion() {
53+
return majorVersion;
54+
}
55+
56+
public void setMajorVersion(int majorVersion) {
57+
this.majorVersion = majorVersion;
58+
}
59+
60+
public int getMinorVersion() {
61+
return minorVersion;
62+
}
63+
64+
public void setMinorVersion(int minorVersion) {
65+
this.minorVersion = minorVersion;
66+
}
67+
68+
public int getRevisionVersion() {
69+
return revisionVersion;
70+
}
71+
72+
public void setRevisionVersion(int revisionVersion) {
73+
this.revisionVersion = revisionVersion;
74+
}
75+
76+
public boolean isSnapshot() {
77+
return snapshot;
78+
}
79+
80+
public void setSnapshot(boolean snapshot) {
81+
this.snapshot = snapshot;
82+
}
83+
84+
@Override
85+
public int compareTo(SystemVersion o) {
86+
if (null == o) return -1;
87+
if (o.getMajorVersion() > this.getMajorVersion()) return -1;
88+
if (o.getMajorVersion() == this.getMajorVersion()) {
89+
if (o.getMinorVersion() > this.getMinorVersion()) return -1;
90+
if (o.getMinorVersion() == this.getMinorVersion()) {
91+
if (o.getRevisionVersion() > this.getRevisionVersion()) return -1;
92+
if (o.getRevisionVersion() == this.getRevisionVersion()) return 0;
93+
return 1;
94+
} else {
95+
return 1;
96+
}
97+
} else {
98+
return 1;
99+
}
100+
}
101+
102+
public static void main(String[] args) {
103+
SystemVersion systemVersion = new SystemVersion();
104+
systemVersion.setMajorVersion(2);
105+
systemVersion.setMinorVersion(2);
106+
systemVersion.setRevisionVersion(1);
107+
108+
SystemVersion systemVersion2 = new SystemVersion();
109+
systemVersion2.setMajorVersion(3);
110+
systemVersion2.setMinorVersion(2);
111+
systemVersion2.setRevisionVersion(1);
112+
113+
System.out.println(systemVersion.compareTo(systemVersion2));
114+
}
115+
}

hsweb-web-bean/src/main/java/org/hsweb/web/bean/po/template/Template.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
import java.util.List;
66

7-
/**
8-
* Created by zhouhao on 16-5-19.
9-
*/
107
public class Template extends GenericPo<String> {
118

129
private String name;

hsweb-web-concurrent/hsweb-web-concurrent-cache/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>hsweb-web-concurrent</artifactId>
77
<groupId>org.hsweb</groupId>
8-
<version>2.0-SNAPSHOT</version>
8+
<version>2.1-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>hsweb-web-concurrent-cache</artifactId>

hsweb-web-concurrent/hsweb-web-concurrent-lock/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>hsweb-web-concurrent</artifactId>
77
<groupId>org.hsweb</groupId>
8-
<version>2.0-SNAPSHOT</version>
8+
<version>2.1-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>hsweb-web-concurrent-lock</artifactId>

hsweb-web-concurrent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>hsweb-framework</artifactId>
77
<groupId>org.hsweb</groupId>
8-
<version>2.0-SNAPSHOT</version>
8+
<version>2.1-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<packaging>pom</packaging>

hsweb-web-controller/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>hsweb-framework</artifactId>
77
<groupId>org.hsweb</groupId>
8-
<version>2.0-SNAPSHOT</version>
8+
<version>2.1-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>hsweb-web-controller</artifactId>

hsweb-web-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>hsweb-framework</artifactId>
77
<groupId>org.hsweb</groupId>
8-
<version>2.0-SNAPSHOT</version>
8+
<version>2.1-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>hsweb-web-core</artifactId>

hsweb-web-core/src/main/java/org/hsweb/web/core/Install.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@
1919
import org.springframework.util.Assert;
2020

2121
import javax.annotation.PostConstruct;
22+
import javax.sql.DataSource;
2223
import java.io.*;
2324
import java.util.ArrayList;
2425
import java.util.List;
2526

26-
/**
27-
* Created by zhouhao on 16-4-23.
28-
*/
2927
@Configuration
3028
@EnableConfigurationProperties({DataSourceProperties.class})
3129
@AutoConfigureAfter({DataSourceAutoConfiguration.class})

0 commit comments

Comments
 (0)