Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
schbrain-archetype
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tools
schbrain-archetype
Commits
1a711839
Commit
1a711839
authored
Mar 19, 2022
by
zhangdd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parents
Pipeline
#751
failed with stages
in 0 seconds
Changes
21
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
594 additions
and
0 deletions
+594
-0
.gitignore
.gitignore
+34
-0
README.assets/image-20220319110829099.png
README.assets/image-20220319110829099.png
+0
-0
README.assets/image-20220319111448870.png
README.assets/image-20220319111448870.png
+0
-0
README.assets/image-20220319111712318.png
README.assets/image-20220319111712318.png
+0
-0
README.assets/image-20220319112028133.png
README.assets/image-20220319112028133.png
+0
-0
README.assets/image-20220319112335276.png
README.assets/image-20220319112335276.png
+0
-0
README.assets/image-20220319112447597.png
README.assets/image-20220319112447597.png
+0
-0
README.assets/image-20220319113235384.png
README.assets/image-20220319113235384.png
+0
-0
README.md
README.md
+55
-0
pom.xml
pom.xml
+23
-0
src/main/resources/META-INF/maven/archetype-metadata.xml
src/main/resources/META-INF/maven/archetype-metadata.xml
+156
-0
src/main/resources/archetype-resources/.gitignore
src/main/resources/archetype-resources/.gitignore
+34
-0
src/main/resources/archetype-resources/__appName__-api-impl/pom.xml
...esources/archetype-resources/__appName__-api-impl/pom.xml
+24
-0
src/main/resources/archetype-resources/__appName__-api/pom.xml
...ain/resources/archetype-resources/__appName__-api/pom.xml
+20
-0
src/main/resources/archetype-resources/__appName__-common/pom.xml
.../resources/archetype-resources/__appName__-common/pom.xml
+20
-0
src/main/resources/archetype-resources/__appName__-dao/pom.xml
...ain/resources/archetype-resources/__appName__-dao/pom.xml
+34
-0
src/main/resources/archetype-resources/__appName__-service/pom.xml
...resources/archetype-resources/__appName__-service/pom.xml
+41
-0
src/main/resources/archetype-resources/__appName__-web/pom.xml
...ain/resources/archetype-resources/__appName__-web/pom.xml
+53
-0
src/main/resources/archetype-resources/__appName__-web/src/main/java/Application.java
...-resources/__appName__-web/src/main/java/Application.java
+13
-0
src/main/resources/archetype-resources/__appName__-web/src/main/resources/application.yaml
...urces/__appName__-web/src/main/resources/application.yaml
+21
-0
src/main/resources/archetype-resources/pom.xml
src/main/resources/archetype-resources/pom.xml
+66
-0
No files found.
.gitignore
0 → 100644
View file @
1a711839
# maven ignore
target/
*.jar
!.mvn/wrapper/*
*.war
*.zip
*.tar
*.tar.gz
.flattened-pom.xml
# eclipse ignore
.settings/
.project
.classpath
# idea ignore
.idea/
*.ipr
*.iml
*.iws
# temp ignore
*.log*
*.cache
*.diff
*.patch
*.tmp
# system ignore
.DS_Store
Thumbs.db
# log
logs
README.assets/image-20220319110829099.png
0 → 100644
View file @
1a711839
174 KB
README.assets/image-20220319111448870.png
0 → 100644
View file @
1a711839
164 KB
README.assets/image-20220319111712318.png
0 → 100644
View file @
1a711839
45.8 KB
README.assets/image-20220319112028133.png
0 → 100644
View file @
1a711839
94.6 KB
README.assets/image-20220319112335276.png
0 → 100644
View file @
1a711839
397 KB
README.assets/image-20220319112447597.png
0 → 100644
View file @
1a711839
454 KB
README.assets/image-20220319113235384.png
0 → 100644
View file @
1a711839
66 KB
README.md
0 → 100644
View file @
1a711839
### 1.为IDEA安装Archetype

1.
在IDEA的新建项目面板为添加脚手架。
```
.xml
<groupId>com.schbrain.kp</groupId>
<artifactId>schbrain-archetype</artifactId>
<version>1.0-SNAPSHOT</version>
```
*Repository项可以指定远程maven仓库或者本地。如果是本地(clone该项目之后进行install)则可以不填。*
2.
点击OK
3.
关闭新建项目面板
### 2.使用安装的Archetype创建项目
再次在IDEA新建项目可以看到安装后的Archetype,可以自行调整Archetype顺序。
<img
src=
"README.assets/image-20220319111448870.png"
alt=
"image-20220319111448870"
style=
"zoom:70%;"
/>
1.
选择
`schebrain-archetype`
点击next
2.
输入以下必要信息,点击下一步
1.
项目名称
2.
项目位置
3.
groupId
4.
ArtifactId
!
[
image-20220319111712318
](
README.assets/image-20220319111712318.png
)
3.
填入自定义属性之后,点击finish
1.
package
2.
appName
!
[
image-20220319112028133
](
README.assets/image-20220319112028133.png
)
---
!
[
image-20220319113235384
](
README.assets/image-20220319113235384.png
)
4.
等待项目自动创建完成
<img
src=
"README.assets/image-20220319112335276.png"
alt=
"image-20220319112335276"
style=
"zoom:50%;"
/>
### 3.启动
<img
src=
"README.assets/image-20220319112447597.png"
alt=
"image-20220319112447597"
style=
"zoom:50%;"
/>
pom.xml
0 → 100644
View file @
1a711839
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.schbrain.kp
</groupId>
<artifactId>
schbrain-archetype
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<name>
schbrain-archetype
</name>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<maven.compiler.source>
11
</maven.compiler.source>
<maven.compiler.target>
11
</maven.compiler.target>
</properties>
</project>
src/main/resources/META-INF/maven/archetype-metadata.xml
0 → 100644
View file @
1a711839
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor
name=
"my-archetype"
>
<requiredProperties>
<requiredProperty
key=
"groupId"
>
<defaultValue>
com.schbrain.kp
</defaultValue>
</requiredProperty>
<requiredProperty
key=
"artifactId"
>
<defaultValue>
notice
</defaultValue>
</requiredProperty>
<requiredProperty
key=
"package"
>
<defaultValue>
com.schbrain.kp.notice
</defaultValue>
</requiredProperty>
<requiredProperty
key=
"appName"
>
<defaultValue>
app
</defaultValue>
</requiredProperty>
</requiredProperties>
<fileSets>
<fileSet
encoding=
"UTF-8"
filtered=
"true"
>
<directory></directory>
<includes>
<include>
.gitignore
</include>
<include>
*.xml
</include>
<include>
*.properties
</include>
</includes>
</fileSet>
</fileSets>
<modules>
<module
id=
"${appName}-api"
dir=
"__appName__-api"
name=
"${appName}-api"
>
<fileSets>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
packaged=
"true"
>
<directory>
src/main/java
</directory>
<includes>
<include>
**/*.java
</include>
</includes>
</fileSet>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
>
<directory/>
<includes>
<include>
pom.xml
</include>
</includes>
</fileSet>
</fileSets>
</module>
<module
id=
"${appName}-api-impl"
dir=
"__appName__-api-impl"
name=
"${appName}-api-impl"
>
<fileSets>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
packaged=
"true"
>
<directory>
src/main/java
</directory>
<includes>
<include>
**/*.java
</include>
</includes>
</fileSet>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
packaged=
"false"
>
<directory>
src/main/resources
</directory>
<includes>
<include>
**/*.*
</include>
</includes>
</fileSet>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
>
<directory/>
<includes>
<include>
pom.xml
</include>
</includes>
</fileSet>
</fileSets>
</module>
<module
id=
"${appName}-common"
dir=
"__appName__-common"
name=
"${appName}-common"
>
<fileSets>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
packaged=
"true"
>
<directory>
src/main/java
</directory>
<includes>
<include>
**/*.java
</include>
</includes>
</fileSet>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
packaged=
"false"
>
<directory>
src/main/resources
</directory>
<includes>
<include>
**/*.*
</include>
</includes>
</fileSet>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
>
<directory/>
<includes>
<include>
pom.xml
</include>
</includes>
</fileSet>
</fileSets>
</module>
<module
id=
"${appName}-dao"
dir=
"__appName__-dao"
name=
"${appName}-dao"
>
<fileSets>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
packaged=
"true"
>
<directory>
src/main/java
</directory>
<includes>
<include>
**/*.java
</include>
</includes>
</fileSet>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
packaged=
"false"
>
<directory>
src/main/resources
</directory>
<includes>
<include>
**/*.*
</include>
</includes>
</fileSet>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
>
<directory/>
<includes>
<include>
pom.xml
</include>
</includes>
</fileSet>
</fileSets>
</module>
<module
id=
"${appName}-service"
dir=
"__appName__-service"
name=
"${appName}-service"
>
<fileSets>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
packaged=
"true"
>
<directory>
src/main/java
</directory>
<includes>
<include>
**/*.java
</include>
</includes>
</fileSet>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
>
<directory/>
<includes>
<include>
pom.xml
</include>
</includes>
</fileSet>
</fileSets>
</module>
<module
id=
"${appName}-web"
dir=
"__appName__-web"
name=
"${appName}-web"
>
<fileSets>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
packaged=
"true"
>
<directory>
src/main/java
</directory>
<includes>
<include>
**/*.java
</include>
<include>
**/*.txt
</include>
</includes>
</fileSet>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
packaged=
"false"
>
<directory>
src/main/resources
</directory>
<includes>
<include>
**/*.*
</include>
</includes>
</fileSet>
<fileSet
filtered=
"true"
encoding=
"UTF-8"
>
<directory/>
<includes>
<include>
pom.xml
</include>
</includes>
</fileSet>
</fileSets>
</module>
</modules>
</archetype-descriptor>
\ No newline at end of file
src/main/resources/archetype-resources/.gitignore
0 → 100644
View file @
1a711839
# maven ignore
target/
*.jar
!.mvn/wrapper/*
*.war
*.zip
*.tar
*.tar.gz
.flattened-pom.xml
# eclipse ignore
.settings/
.project
.classpath
# idea ignore
.idea/
*.ipr
*.iml
*.iws
# temp ignore
*.log*
*.cache
*.diff
*.patch
*.tmp
# system ignore
.DS_Store
Thumbs.db
# log
logs
src/main/resources/archetype-resources/__appName__-api-impl/pom.xml
0 → 100644
View file @
1a711839
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
${groupId}
</groupId>
<artifactId>
${rootArtifactId}
</artifactId>
<version>
${revision}
</version>
</parent>
<artifactId>
${appName}-api-impl
</artifactId>
<properties>
<maven.deploy.skip>
true
</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>
com.schbrain.kp
</groupId>
<artifactId>
${appName}-service
</artifactId>
</dependency>
</dependencies>
</project>
src/main/resources/archetype-resources/__appName__-api/pom.xml
0 → 100644
View file @
1a711839
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
${groupId}
</groupId>
<artifactId>
${rootArtifactId}
</artifactId>
<version>
${revision}
</version>
</parent>
<artifactId>
${appName}-api
</artifactId>
<dependencies>
<dependency>
<groupId>
com.schbrain.kp
</groupId>
<artifactId>
${appName}-common
</artifactId>
</dependency>
</dependencies>
</project>
src/main/resources/archetype-resources/__appName__-common/pom.xml
0 → 100644
View file @
1a711839
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
${groupId}
</groupId>
<artifactId>
${rootArtifactId}
</artifactId>
<version>
${revision}
</version>
</parent>
<artifactId>
${appName}-common
</artifactId>
<dependencies>
<dependency>
<groupId>
com.schbrain.common
</groupId>
<artifactId>
common
</artifactId>
</dependency>
</dependencies>
</project>
src/main/resources/archetype-resources/__appName__-dao/pom.xml
0 → 100644
View file @
1a711839
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
${groupId}
</groupId>
<artifactId>
${rootArtifactId}
</artifactId>
<version>
${revision}
</version>
</parent>
<artifactId>
${appName}-dao
</artifactId>
<properties>
<maven.deploy.skip>
true
</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>
com.schbrain.kp
</groupId>
<artifactId>
${appName}-common
</artifactId>
</dependency>
<dependency>
<groupId>
com.schbrain.framework
</groupId>
<artifactId>
mybatis-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
druid-spring-boot-starter
</artifactId>
</dependency>
</dependencies>
</project>
src/main/resources/archetype-resources/__appName__-service/pom.xml
0 → 100644
View file @
1a711839
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
${groupId}
</groupId>
<artifactId>
${rootArtifactId}
</artifactId>
<version>
${revision}
</version>
</parent>
<artifactId>
${appName}-service
</artifactId>
<properties>
<maven.deploy.skip>
true
</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>
com.schbrain.kp
</groupId>
<artifactId>
${appName}-dao
</artifactId>
</dependency>
<dependency>
<groupId>
com.schbrain.kp
</groupId>
<artifactId>
${appName}-api
</artifactId>
</dependency>
<dependency>
<groupId>
com.schbrain.framework
</groupId>
<artifactId>
logger-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
</dependencies>
</project>
src/main/resources/archetype-resources/__appName__-web/pom.xml
0 → 100644
View file @
1a711839
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
${groupId}
</groupId>
<artifactId>
${rootArtifactId}
</artifactId>
<version>
${revision}
</version>
</parent>
<artifactId>
${appName}-web
</artifactId>
<properties>
<maven.deploy.skip>
true
</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>
com.schbrain.kp
</groupId>
<artifactId>
${appName}-api-impl
</artifactId>
</dependency>
<dependency>
<groupId>
com.schbrain.common
</groupId>
<artifactId>
web-common
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
<plugin>
<groupId>
com.schbrain.maven.plugin
</groupId>
<artifactId>
integration-maven-plugin
</artifactId>
</plugin>
<plugin>
<groupId>
pl.project13.maven
</groupId>
<artifactId>
git-commit-id-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
src/main/resources/archetype-resources/__appName__-web/src/main/java/Application.java
0 → 100644
View file @
1a711839
package
${
package
};
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
Application
.
class
,
args
);
}
}
src/main/resources/archetype-resources/__appName__-web/src/main/resources/application.yaml
0 → 100644
View file @
1a711839
spring
:
application
:
name
:
${rootArtifactId}
profiles
:
active
:
dev
apollo
:
bootstrap
:
namespaces
:
kp.common.spring.jdbc
eureka
:
client
:
service-url
:
defaultZone
:
http://kp-register-center:18080/eureka/
instance
:
prefer-ip-address
:
true
lease-renewal-interval-in-seconds
:
5
lease-expiration-duration-in-seconds
:
15
schbrain
:
logging
:
file
:
enable-json-log-write-to-logstash
:
true
\ No newline at end of file
src/main/resources/archetype-resources/pom.xml
0 → 100644
View file @
1a711839
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
com.schbrain.framework
</groupId>
<artifactId>
schbrain-parent
</artifactId>
<version>
1.0.0-SNAPSHOT
</version>
</parent>
<groupId>
${groupId}
</groupId>
<artifactId>
${artifactId}
</artifactId>
<packaging>
pom
</packaging>
<version>
${revision}
</version>
<properties>
<revision>
1.0.0-SNAPSHOT
</revision>
</properties>
<modules>
<module>
${appName}-api
</module>
<module>
${appName}-api-impl
</module>
<module>
${appName}-common
</module>
<module>
${appName}-dao
</module>
<module>
${appName}-service
</module>
<module>
${appName}-web
</module>
</modules>
<dependencyManagement>
<dependencies>
<!--一方库-->
<dependency>
<groupId>
com.schbrain.kp
</groupId>
<artifactId>
${appName}-api
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.schbrain.kp
</groupId>
<artifactId>
${appName}-api-impl
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.schbrain.kp
</groupId>
<artifactId>
${appName}-common
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.schbrain.kp
</groupId>
<artifactId>
${appName}-dao
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.schbrain.kp
</groupId>
<artifactId>
${appName}-service
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.schbrain.kp
</groupId>
<artifactId>
${appName}-web
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment