Commit 04465c2a authored by wutu's avatar wutu

添加README描述

parent 4a8b4f2a
# 范例项目说明
## 注意
这是一个范例项目,请勿在此项目中添加新的业务代码
## 平台应用创建流程
1. 当需要创建一个平台应用时,需要在apps目录中创建对应的module,以便进行应用的管理。
2. 新建module中必须包含以下依赖:
```xml
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>top.ninwoo</groupId>
<artifactId>cnf-client-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
```
其中的`spring-boot-starter-web`可以变更为`spring-boot-starter`,具体根据是否有web应用需求而定。
3. 新建module必须包含以下plugin,以防止打Jar包时出现找不到主类的问题:
```xml
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${springboot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
```
4. 应用中必须有主类,主类应该符合SpringBoot项目的主类编写方式。
## 警告
* 所有的应用禁止引用除starter之外的平台Jar包,包括:
* cnf-cloud-center
* cnf-edge-center
* cnf-test
* cnf-cloud-ipservice
* 其他基础工具包
# 边缘承载节点
该Module为
\ No newline at end of file
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<artifactId>spring-boot-starter-log4j2</artifactId> <artifactId>spring-boot-starter-log4j2</artifactId>
</dependency> </dependency>
<!--<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId> <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency> </dependency>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
</dependency>--> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment