Skip to content

Commit 57e5f1a

Browse files
authored
Update README.md
1 parent 6706489 commit 57e5f1a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,28 @@ https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSOND
7777
#### 1.在你项目的主程序启动类 Application 的 static {} 代码块配置 APIJSONApplication.DEFAULT_APIJSON_CREATOR,至少重写 createSQLConfig 方法返回你自己继承 APIJSONSQLConfig 的子类
7878
#### 1.Configure APIJSONApplication.DEFAULT_APIJSON_CREATOR in static {} of your Application, at least override createSQLConfig method and return your SQLConfig extends APIJSONSQLConfig.
7979

80+
```java
81+
static {
82+
APIJSONApplication.DEFAULT_APIJSON_CREATOR = new APIJSONCreator<Long>() {
83+
@Override
84+
public SQLConfig createSQLConfig() {
85+
return new DemoSQLConfig();
86+
}
87+
};
88+
```
89+
8090
<br />
8191

8292
#### 2.在你项目的主程序启动类 Application 的 main 方法里 SpringApplication.run 后调用 APIJSONApplication.init
8393
#### 2.Call APIJSONApplication.init after SpringApplication.run in main method of your Application
8494

95+
```java
96+
public static void main(String[] args) throws Exception {
97+
SpringApplication.run(DemoApplication.class, args);
98+
APIJSONApplication.init();
99+
}
100+
```
101+
85102
<br />
86103

87104
#### 见 [apijson.framework](/src/main/java/apijson/framework) 里各个类的注释及 [APIJSONDemo](https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSONDemo) 里的 [DemoApplication](https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoApplication.java) <br />

0 commit comments

Comments
 (0)