Skip to content

Commit 4f438d1

Browse files
committed
project jdk upgrade to 11
1 parent b5bd5da commit 4f438d1

File tree

9 files changed

+70
-91
lines changed

9 files changed

+70
-91
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ Slightly Framework design to support Spring based java or Bigdata program.
9797
f.support Hadoop plateform
9898
g. Excel read write utils support auto merge columns and customer header define.
9999

100+
XI.Develop Requirement
101+
open JDK 11 or above installed
102+
Spring 5.2.22
103+
Spring boot 2.5.14
104+
Other jar dependency see parent pom
105+
100106

101107
3.Development
102108

README.zh.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
#### 软件架构
1111
软件架构说明
1212

13+
开发环境及工具
14+
15+
1.open JDK11 以上
16+
2.Spring 5.2.22
17+
3.Spring boot 2.5.14
18+
1319
目前框架由8个模块组成
1420

1521
1.Core:核心包,包含Model/DAO/Service及ORM的基础类及DB Dialect。数据库Dump和Import的工具包等,支持JAVA基本框架的内容

common/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,11 @@
388388
<injar>common-1.0-SNAPSHOT.jar</injar>
389389
<proguardInclude>${project.basedir}/../config/proguard.cfg</proguardInclude>
390390
<libs>
391-
<lib>${java.home}/lib/rt.jar</lib>
391+
<lib>${java.home}/jmods/java.base.jmod</lib>
392+
<lib>${java.home}/jmods/java.datatransfer.jmod</lib>
393+
<lib>${java.home}/jmods/java.prefs.jmod</lib>
394+
<lib>${java.home}/jmods/java.xml.jmod</lib>
395+
<lib>${java.home}/jmods/java.desktop.jmod</lib>
392396
</libs>
393397
<options>
394398

core/pom.xml

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -122,24 +122,13 @@
122122
<version>${jackson.version}</version>
123123
<optional>true</optional>
124124
</dependency>
125-
<!-- <dependency>
126-
<groupId>org.ow2.asm</groupId>
127-
<artifactId>asm</artifactId>
128-
<version>6.1</version>
129-
<optional>true</optional>
130-
</dependency>-->
125+
131126
<dependency>
132127
<groupId>org.javassist</groupId>
133128
<artifactId>javassist</artifactId>
134129
<version>3.23.2-GA</version>
135130
<optional>true</optional>
136131
</dependency>
137-
<!--<dependency>
138-
<groupId>org.ow2.asm</groupId>
139-
<artifactId>asm-util</artifactId>
140-
<version>6.2</version>
141-
<optional>true</optional>
142-
</dependency>-->
143132

144133
<dependency>
145134
<groupId>junit</groupId>
@@ -322,24 +311,6 @@
322311
<encoding>UTF-8</encoding>
323312
</configuration>
324313
</plugin>
325-
<!-- <plugin>
326-
<groupId>org.apache.maven.plugins</groupId>
327-
<artifactId>maven-dependency-plugin</artifactId>
328-
<executions>
329-
<execution>
330-
<id>copy</id>
331-
<phase>install</phase>
332-
<goals>
333-
<goal>copy-dependencies</goal>
334-
</goals>
335-
<configuration>
336-
<outputDirectory>
337-
${project.build.directory}/lib
338-
</outputDirectory>
339-
</configuration>
340-
</execution>
341-
</executions>
342-
</plugin>-->
343314
<plugin>
344315
<groupId>com.github.wvengen</groupId>
345316
<artifactId>proguard-maven-plugin</artifactId>
@@ -369,7 +340,11 @@
369340
<injarNotExistsSkip>true</injarNotExistsSkip>
370341
<proguardInclude>${project.basedir}/../config/proguard.cfg</proguardInclude>
371342
<libs>
372-
<lib>${java.home}/lib/rt.jar</lib>
343+
<lib>${java.home}/jmods/java.base.jmod</lib>
344+
<lib>${java.home}/jmods/java.datatransfer.jmod</lib>
345+
<lib>${java.home}/jmods/java.prefs.jmod</lib>
346+
<lib>${java.home}/jmods/java.xml.jmod</lib>
347+
<lib>${java.home}/jmods/java.desktop.jmod</lib>
373348
</libs>
374349
<options> <!-- Detail see ProGuard Config -->
375350
</options>

core/src/main/java/com/robin/core/hardware/MachineIdUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static String getMachineId() throws RuntimeException {
5454
reader.close();
5555
}
5656
} catch (Exception ex) {
57-
57+
ex.printStackTrace();
5858
}
5959
}
6060
}

core/src/main/java/com/robin/core/hardware/WinRegistry.java

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -34,38 +34,38 @@ public class WinRegistry {
3434
static {
3535
try {
3636
regOpenKey = userClass.getDeclaredMethod("WindowsRegOpenKey",
37-
new Class[]{int.class, byte[].class, int.class});
37+
new Class[]{long.class, byte[].class, int.class});
3838
regOpenKey.setAccessible(true);
3939
regCloseKey = userClass.getDeclaredMethod("WindowsRegCloseKey",
40-
new Class[]{int.class});
40+
new Class[]{long.class});
4141
regCloseKey.setAccessible(true);
4242
regQueryValueEx = userClass.getDeclaredMethod("WindowsRegQueryValueEx",
43-
new Class[]{int.class, byte[].class});
43+
new Class[]{long.class, byte[].class});
4444
regQueryValueEx.setAccessible(true);
4545
regEnumValue = userClass.getDeclaredMethod("WindowsRegEnumValue",
46-
new Class[]{int.class, int.class, int.class});
46+
new Class[]{long.class, int.class, int.class});
4747
regEnumValue.setAccessible(true);
4848
regQueryInfoKey = userClass.getDeclaredMethod("WindowsRegQueryInfoKey1",
49-
new Class[]{int.class});
49+
new Class[]{long.class});
5050
regQueryInfoKey.setAccessible(true);
5151
regEnumKeyEx = userClass.getDeclaredMethod(
52-
"WindowsRegEnumKeyEx", new Class[]{int.class, int.class,
52+
"WindowsRegEnumKeyEx", new Class[]{long.class, int.class,
5353
int.class});
5454
regEnumKeyEx.setAccessible(true);
5555
regCreateKeyEx = userClass.getDeclaredMethod(
56-
"WindowsRegCreateKeyEx", new Class[]{int.class,
56+
"WindowsRegCreateKeyEx", new Class[]{long.class,
5757
byte[].class});
5858
regCreateKeyEx.setAccessible(true);
5959
regSetValueEx = userClass.getDeclaredMethod(
60-
"WindowsRegSetValueEx", new Class[]{int.class,
60+
"WindowsRegSetValueEx", new Class[]{long.class,
6161
byte[].class, byte[].class});
6262
regSetValueEx.setAccessible(true);
6363
regDeleteValue = userClass.getDeclaredMethod(
64-
"WindowsRegDeleteValue", new Class[]{int.class,
64+
"WindowsRegDeleteValue", new Class[]{long.class,
6565
byte[].class});
6666
regDeleteValue.setAccessible(true);
6767
regDeleteKey = userClass.getDeclaredMethod(
68-
"WindowsRegDeleteKey", new Class[]{int.class,
68+
"WindowsRegDeleteKey", new Class[]{long.class,
6969
byte[].class});
7070
regDeleteKey.setAccessible(true);
7171
} catch (Exception e) {
@@ -155,13 +155,13 @@ public static List<String> readStringSubKeys(int hkey, String key)
155155
public static void createKey(int hkey, String key)
156156
throws IllegalArgumentException, IllegalAccessException,
157157
InvocationTargetException {
158-
int[] ret;
158+
long[] ret;
159159
if (hkey == HKEY_LOCAL_MACHINE) {
160160
ret = createKey(systemRoot, hkey, key);
161-
regCloseKey.invoke(systemRoot, new Object[]{Integer.valueOf(ret[0])});
161+
regCloseKey.invoke(systemRoot, new Object[]{Long.valueOf(ret[0])});
162162
} else if (hkey == HKEY_CURRENT_USER) {
163163
ret = createKey(userRoot, hkey, key);
164-
regCloseKey.invoke(userRoot, new Object[]{Integer.valueOf(ret[0])});
164+
regCloseKey.invoke(userRoot, new Object[]{Long.valueOf(ret[0])});
165165
} else {
166166
throw new IllegalArgumentException("hkey=" + hkey);
167167
}
@@ -206,7 +206,7 @@ public static void createKey(int hkey, String key)
206206
public static void deleteKey(int hkey, String key)
207207
throws IllegalArgumentException, IllegalAccessException,
208208
InvocationTargetException {
209-
int rc = -1;
209+
long rc = -1;
210210
if (hkey == HKEY_LOCAL_MACHINE) {
211211
rc = deleteKey(systemRoot, hkey, key);
212212
} else if (hkey == HKEY_CURRENT_USER) {
@@ -260,25 +260,25 @@ public static void deleteValue(int hkey, String key, String value)
260260
return rc;
261261
}
262262

263-
private static int deleteKey(Preferences root, int hkey, String key)
263+
private static long deleteKey(Preferences root, int hkey, String key)
264264
throws IllegalArgumentException, IllegalAccessException,
265265
InvocationTargetException {
266-
int rc = ((Integer) regDeleteKey.invoke(root,
267-
new Object[]{new Integer(hkey), toCstr(key)})).intValue();
266+
long rc = ((Long) regDeleteKey.invoke(root,
267+
new Object[]{new Long(hkey), toCstr(key)})).intValue();
268268
return rc; // can REG_NOTFOUND, REG_ACCESSDENIED, REG_SUCCESS
269269
}
270270

271271
private static String readString(Preferences root, int hkey, String key, String value)
272272
throws IllegalArgumentException, IllegalAccessException,
273273
InvocationTargetException {
274-
int[] handles = (int[]) regOpenKey.invoke(root, new Object[]{
275-
new Integer(hkey), toCstr(key), new Integer(KEY_READ)});
274+
long[] handles = (long[]) regOpenKey.invoke(root, new Object[]{
275+
new Long(hkey), toCstr(key), new Integer(KEY_READ)});
276276
if (handles[1] != REG_SUCCESS) {
277277
return null;
278278
}
279279
byte[] valb = (byte[]) regQueryValueEx.invoke(root, new Object[]{
280-
new Integer(handles[0]), toCstr(value)});
281-
regCloseKey.invoke(root, new Object[]{new Integer(handles[0])});
280+
new Long(handles[0]), toCstr(value)});
281+
regCloseKey.invoke(root, new Object[]{new Long(handles[0])});
282282
return (valb != null ? new String(valb).trim() : null);
283283
}
284284

@@ -287,24 +287,24 @@ private static String readString(Preferences root, int hkey, String key, String
287287
throws IllegalArgumentException, IllegalAccessException,
288288
InvocationTargetException {
289289
HashMap<String, String> results = new HashMap<String, String>();
290-
int[] handles = (int[]) regOpenKey.invoke(root, new Object[]{
291-
new Integer(hkey), toCstr(key), Integer.valueOf(KEY_READ)});
290+
long[] handles = (long[]) regOpenKey.invoke(root, new Object[]{
291+
new Long(hkey), toCstr(key), Integer.valueOf(KEY_READ)});
292292
if (handles[1] != REG_SUCCESS) {
293293
return null;
294294
}
295-
int[] info = (int[]) regQueryInfoKey.invoke(root,
296-
new Object[]{new Integer(handles[0])});
295+
long[] info = (long[]) regQueryInfoKey.invoke(root,
296+
new Object[]{new Long(handles[0])});
297297

298-
int count = info[0]; // count
299-
int maxlen = info[3]; // value length max
298+
long count = info[0]; // count
299+
long maxlen = info[3]; // value length max
300300
for (int index = 0; index < count; index++) {
301301
byte[] name = (byte[]) regEnumValue.invoke(root, new Object[]{
302-
new Integer
303-
(handles[0]), new Integer(index), new Integer(maxlen + 1)});
302+
new Long
303+
(handles[0]), new Integer(index), new Integer(((Long)maxlen).intValue() + 1)});
304304
String value = readString(hkey, key, new String(name));
305305
results.put(new String(name).trim(), value);
306306
}
307-
regCloseKey.invoke(root, new Object[]{new Integer(handles[0])});
307+
regCloseKey.invoke(root, new Object[]{new Long(handles[0])});
308308
return results;
309309
}
310310

@@ -335,11 +335,11 @@ private static String readString(Preferences root, int hkey, String key, String
335335
return results;
336336
}
337337

338-
private static int[] createKey(Preferences root, int hkey, String key)
338+
private static long[] createKey(Preferences root, int hkey, String key)
339339
throws IllegalArgumentException, IllegalAccessException,
340340
InvocationTargetException {
341-
return (int[]) regCreateKeyEx.invoke(root,
342-
new Object[]{Integer.valueOf(hkey), toCstr(key)});
341+
return (long[]) regCreateKeyEx.invoke(root,
342+
new Object[]{Long.valueOf(hkey), toCstr(key)});
343343
}
344344

345345
private static void writeStringValue

estool/pom.xml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,11 @@
193193
<!--<attachArtifactClassifier>pg</attachArtifactClassifier>-->
194194
<!-- attach 的作用是在 install 与 deploy 时将生成的 pg 文件也安装与部署 -->
195195
<libs>
196-
<lib>${java.home}/lib/rt.jar</lib>
196+
<lib>${java.home}/jmods/java.base.jmod</lib>
197+
<lib>${java.home}/jmods/java.datatransfer.jmod</lib>
198+
<lib>${java.home}/jmods/java.prefs.jmod</lib>
199+
<lib>${java.home}/jmods/java.xml.jmod</lib>
200+
<lib>${java.home}/jmods/java.desktop.jmod</lib>
197201
</libs>
198202
<options> <!-- 详细配置方式参考 ProGuard 官方文档 -->
199203
</options>
@@ -213,27 +217,7 @@
213217
</dependency>
214218
</dependencies>
215219
</plugin>
216-
<!-- <plugin>
217-
<groupId>org.codehaus.mojo</groupId>
218-
<artifactId>exec-maven-plugin</artifactId>
219-
<version>1.6.0</version>
220-
<executions>
221-
<execution>
222-
<phase>package</phase>
223-
<goals>
224-
<goal>exec</goal>
225-
</goals>
226-
<configuration>
227-
<executable>${project.basedir}\..\script\runobfuse.cmd</executable>
228-
<arguments>
229-
<argument>${project.basedir}</argument>
230-
<argument>estools-1.0-SNAPSHOT.jar</argument>
231-
<argument>estools-1.0-SNAPSHOT.jar.bak</argument>
232-
</arguments>
233-
</configuration>
234-
</execution>
235-
</executions>
236-
</plugin>-->
220+
237221
</plugins>
238222
</build>
239223
</project>

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
<!-- properties -->
5858
<properties>
5959
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
60-
<maven.compiler.source>1.8</maven.compiler.source>
61-
<maven.compiler.target>1.8</maven.compiler.target>
60+
<maven.compiler.source>11</maven.compiler.source>
61+
<maven.compiler.target>11</maven.compiler.target>
6262
<!-- jar version -->
6363
<mybatis-spring.version>1.2.1</mybatis-spring.version>
6464
<mybatis.version>3.5.6</mybatis.version>

web/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@
142142
<version>1.8.22.RELEASE</version>
143143
<optional>true</optional>
144144
</dependency>
145-
145+
<dependency>
146+
<groupId>javax.annotation</groupId>
147+
<artifactId>javax.annotation-api</artifactId>
148+
<version>1.3.2</version>
149+
</dependency>
146150

147151
</dependencies>
148152

0 commit comments

Comments
 (0)