Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
maven-project-demo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
计万成
maven-project-demo
Commits
f9669e3b
Commit
f9669e3b
authored
Sep 11, 2020
by
jwc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目优化
parent
baaddbde
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
25 deletions
+26
-25
pom.xml
pom.xml
+1
-18
src/main/java/cn/zingfin/common/constants/DemoConstant.java
src/main/java/cn/zingfin/common/constants/DemoConstant.java
+1
-1
src/main/java/cn/zingfin/common/utils/DemoUtil.java
src/main/java/cn/zingfin/common/utils/DemoUtil.java
+8
-0
src/main/java/cn/zingfin/web/controller/HelloWorldController.java
.../java/cn/zingfin/web/controller/HelloWorldController.java
+1
-3
src/main/java/cn/zingfin/web/model/InputModel.java
src/main/java/cn/zingfin/web/model/InputModel.java
+8
-3
src/main/resources/Dockerfile
src/main/resources/Dockerfile
+7
-0
No files found.
pom.xml
View file @
f9669e3b
...
@@ -37,12 +37,6 @@
...
@@ -37,12 +37,6 @@
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<optional>
true
</optional>
</dependency>
<!--web核心依赖-->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<artifactId>
spring-boot-starter-web
</artifactId>
...
@@ -114,17 +108,6 @@
...
@@ -114,17 +108,6 @@
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
2.3.0.RELEASE
</version>
<version>
2.3.0.RELEASE
</version>
<configuration>
<mainClass>
cn.zingfin.MainApplication
</mainClass>
</configuration>
<executions>
<execution>
<id>
repackage
</id>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>
com.spotify
</groupId>
<groupId>
com.spotify
</groupId>
...
@@ -132,7 +115,7 @@
...
@@ -132,7 +115,7 @@
<version>
1.2.0
</version>
<version>
1.2.0
</version>
<configuration>
<configuration>
<imageName>
${docker.image.prefix}/${project.artifactId}
</imageName>
<imageName>
${docker.image.prefix}/${project.artifactId}
</imageName>
<dockerDirectory>
src/main/resources
/docker
</dockerDirectory>
<dockerDirectory>
src/main/resources
</dockerDirectory>
<resources>
<resources>
<resource>
<resource>
<targetPath>
/
</targetPath>
<targetPath>
/
</targetPath>
...
...
src/main/java/cn/zingfin/common/constant/DemoConstant.java
→
src/main/java/cn/zingfin/common/constant
s
/DemoConstant.java
View file @
f9669e3b
package
cn
.
zingfin
.
common
.
constant
;
package
cn
.
zingfin
.
common
.
constant
s
;
/**
/**
* @author jwc
* @author jwc
...
...
src/main/java/cn/zingfin/common/util/DemoUtil.java
→
src/main/java/cn/zingfin/common/util
s
/DemoUtil.java
View file @
f9669e3b
package
cn
.
zingfin
.
common
.
util
;
package
cn
.
zingfin
.
common
.
util
s
;
/**
/**
* @author jwc
* @author jwc
* @date 2020/9/
8 13:53
* @date 2020/9/
11 17:51
*/
*/
public
class
DemoUtil
{
public
class
DemoUtil
{
}
}
src/main/java/cn/zingfin/web/controller/HelloWorldController.java
View file @
f9669e3b
...
@@ -2,7 +2,6 @@ package cn.zingfin.web.controller;
...
@@ -2,7 +2,6 @@ package cn.zingfin.web.controller;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -14,13 +13,12 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -14,13 +13,12 @@ import org.springframework.web.bind.annotation.RestController;
@Api
(
tags
=
"测试接口"
)
@Api
(
tags
=
"测试接口"
)
@RequestMapping
(
"/main"
)
@RequestMapping
(
"/main"
)
@RestController
@RestController
@Slf4j
public
class
HelloWorldController
{
public
class
HelloWorldController
{
@ApiOperation
(
"新增代理商"
)
@ApiOperation
(
"新增代理商"
)
@GetMapping
(
"/hello"
)
@GetMapping
(
"/hello"
)
public
String
hello
()
{
public
String
hello
()
{
log
.
info
(
"hello world!
"
);
System
.
out
.
println
(
"你好呀,小顽皮
"
);
return
"hello world!"
;
return
"hello world!"
;
}
}
...
...
src/main/java/cn/zingfin/web/model/InputModel.java
View file @
f9669e3b
package
cn
.
zingfin
.
web
.
model
;
package
cn
.
zingfin
.
web
.
model
;
import
lombok.Data
;
/**
/**
* @author jwc
* @author jwc
* @date 2020/8/31 14:46
* @date 2020/8/31 14:46
*/
*/
@Data
public
class
InputModel
{
public
class
InputModel
{
private
String
name
;
private
String
name
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
}
src/main/resources/
docker/
Dockerfile
→
src/main/resources/Dockerfile
View file @
f9669e3b
FROM
centos-jdk8
FROM
my
centos-jdk8
ADD
demo-0.0.1-SNAPSHOT.jar /opt/app/demo-0.0.1-SNAPSHOT.jar
ADD
demo-0.0.1-SNAPSHOT.jar /opt/app/demo-0.0.1-SNAPSHOT.jar
ENV
JAVA_HOME=/opt/jdk1.8.0_261
ENV
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV
PATH=$JAVA_HOME/bin:$PATH
ENTRYPOINT
[ \
ENTRYPOINT
[ \
"java","-Djava.security.egd=file:/dev/./urandom", \
"java","-Djava.security.egd=file:/dev/./urandom", \
"-Duser.timezone=Asia/Shanghai", \
"-Duser.timezone=Asia/Shanghai", \
...
...
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