Skip to content

Commit

Permalink
升级 apijson-orm, fastjson, mysql-connector-java 等版本
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyLemon committed Sep 25, 2020
1 parent 9074192 commit 3b5bb19
Show file tree
Hide file tree
Showing 14 changed files with 96 additions and 12 deletions.
2 changes: 0 additions & 2 deletions APIJSON-Java-Server/APIJSONBoot/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="libs/apijson-framework-4.2.0.jar"/>
<classpathentry kind="lib" path="libs/apijson-orm-4.2.0.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
23 changes: 23 additions & 0 deletions APIJSON-Java-Server/APIJSONBoot/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>apijson-boot</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
Binary file not shown.
Binary file not shown.
Binary file removed APIJSON-Java-Server/APIJSONBoot/libs/ojdbc8.jar
Binary file not shown.
16 changes: 8 additions & 8 deletions APIJSON-Java-Server/APIJSONBoot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>apijson.boot</groupId>
<artifactId>apijson-boot</artifactId>
<version>4.1.0</version>
<version>4.2.3</version>
<packaging>jar</packaging>

<name>APIJSONBoot</name>
Expand All @@ -29,7 +29,7 @@
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.61</version>
<version>1.2.73</version>
</dependency>

<!-- APIJSONBoot 需要用的 Spring 框架,1.4.1 以上 -->
Expand All @@ -51,7 +51,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.11</version>
<version>8.0.16</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
Expand All @@ -70,14 +70,14 @@
<version>11.5.0.0</version>
</dependency>

<!-- 没找到合适且稳定的 Oracle 的 JDBC Maven 依赖,已在 libs 目录放了对应的 jar 包来替代 -->
<!-- 没找到合适且稳定的 Oracle 的 JDBC Maven 依赖,需要自行下载 jar -->

<!-- 可使用 libs 目录的 apijson-framework.jar 和 apijson-orm.jar 本地 jar 包依赖来替代,两种方式二选一 -->
<!-- <dependency>
<dependency>
<groupId>com.github.APIJSON</groupId>
<artifactId>apijson-framework</artifactId>
<version>LATEST</version>
</dependency> -->
<version>4.2.3</version>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import static apijson.RequestRole.OWNER;
import static apijson.RequestRole.UNKNOWN;

import com.alibaba.fastjson.annotation.JSONField;

import apijson.MethodAccess;
import apijson.framework.BaseModel;

Expand Down Expand Up @@ -70,9 +72,14 @@ public Privacy setPhone(String phone) {
return this;
}

/**get_password会转为password
/**fastjson >= 1.2.70 的版本时,JSON.toJSONString 后,
* get__password, get_password 会分别转为 __password, password,
* 不像之前(例如 1.2.61 及以下)分别转为 _password, password,
* 如果 @JSONField(name="_password") 未生效,请勿使用 1.2.70-1.2.73,或调整数据库字段命名为 __password
* @return
*/

@JSONField(name="_password")
public String get__password() {
return password;
}
Expand All @@ -81,9 +88,14 @@ public Privacy setPassword(String password) {
return this;
}

/**get_PayPassword会转为PayPassword
/**fastjson >= 1.2.70 的版本时,JSON.toJSONString 后,
* get__payPassword, get_payPassword 会分别转为 __payPassword, payPassword,
* 不像之前(例如 1.2.61 及以下)分别转为 _payPassword, payPassword,
* 如果 @JSONField(name="_payPassword") 未生效,请勿使用 1.2.70-1.2.73,或调整数据库字段命名为 __payPassword
* @return
*/

@JSONField(name="_payPassword")
public String get__payPassword() {
return payPassword;
}
Expand Down
23 changes: 23 additions & 0 deletions APIJSON-Java-Server/APIJSONBootTest/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>apijson-boot-test</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

0 comments on commit 3b5bb19

Please sign in to comment.