Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
y_initiate
springboot模板
提交
56eff32a
S
springboot模板
项目概览
y_initiate
/
springboot模板
与 Fork 源项目一致
Fork自
小小白鸽 / springboot-template
通知
2
Star
1
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
springboot模板
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
56eff32a
编写于
8月 28, 2023
作者:
W
weixin_43814374
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Auto Commit
上级
ce2ccbc7
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
80 addition
and
30 deletion
+80
-30
.inscode
.inscode
+1
-1
pom.xml
pom.xml
+15
-16
src/main/java/com/template/TemplateApplication.java
src/main/java/com/template/TemplateApplication.java
+1
-1
src/main/java/com/template/config/MybatisPlusConfig
src/main/java/com/template/config/MybatisPlusConfig
+3
-2
src/main/java/com/template/controller/TestController.java
src/main/java/com/template/controller/TestController.java
+18
-0
src/main/resources/application-dev.yml
src/main/resources/application-dev.yml
+1
-3
src/main/resources/application-prod.yml
src/main/resources/application-prod.yml
+1
-3
src/main/resources/application-test.yml
src/main/resources/application-test.yml
+1
-3
src/main/resources/application.yml
src/main/resources/application.yml
+12
-1
target/classes/application-dev.yml
target/classes/application-dev.yml
+1
-0
target/classes/application-prod.yml
target/classes/application-prod.yml
+1
-0
target/classes/application-test.yml
target/classes/application-test.yml
+1
-0
target/classes/application.yml
target/classes/application.yml
+13
-0
target/classes/com/template/TemplateApplication.class
target/classes/com/template/TemplateApplication.class
+0
-0
target/classes/com/template/config/SwaggerConfig.class
target/classes/com/template/config/SwaggerConfig.class
+0
-0
target/classes/com/template/config/WebMvcConfiguration.class
target/classes/com/template/config/WebMvcConfiguration.class
+0
-0
target/classes/com/template/controller/TestController.class
target/classes/com/template/controller/TestController.class
+0
-0
target/maven-archiver/pom.properties
target/maven-archiver/pom.properties
+3
-0
target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
...-compiler-plugin/compile/default-compile/createdFiles.lst
+4
-0
target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
...en-compiler-plugin/compile/default-compile/inputFiles.lst
+4
-0
target/springboot-template-0.0.1-SNAPSHOT.jar
target/springboot-template-0.0.1-SNAPSHOT.jar
+0
-0
target/springboot-template-0.0.1-SNAPSHOT.jar.original
target/springboot-template-0.0.1-SNAPSHOT.jar.original
+0
-0
未找到文件。
.inscode
浏览文件 @
56eff32a
run = "mvn
-Dmaven.test.skip=true spring-boot:run
"
run = "mvn
clean package -Dmaven.test.skip=true -P dev;cd target;java -jar springboot-template*.jar
"
language = "java"
[debugger]
...
...
pom.xml
浏览文件 @
56eff32a
...
...
@@ -17,7 +17,7 @@
<packaging>
jar
</packaging>
<properties>
<java.version>
1
7
</java.version>
<java.version>
1
.8
</java.version>
</properties>
<dependencies>
...
...
@@ -41,32 +41,32 @@
</dependency>
<!--druid starter-->
<dependency>
<
!-- <
dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.10</version>
</dependency>
</dependency>
-->
<!--mysql-->
<dependency>
<
!-- <
dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.47</version>
</dependency>
</dependency>
-->
<!--mybatis-->
<!--<dependency>
<!--
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.0</version>
</dependency>-->
</dependency>
-->
<!--mybatis-plus-->
<dependency>
<
!-- <
dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.0</version>
</dependency>
</dependency>
-->
<!--swagger3-->
<dependency>
...
...
@@ -107,36 +107,35 @@
</build>
<profiles>
<!--
开发环境
-->
<!--
开发环境
-->
<profile>
<id>
dev
</id>
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
<properties>
<
profileName>
dev
</profileNam
e>
<
spring.profiles.active>
dev
</spring.profiles.activ
e>
</properties>
</profile>
<!--
测试环境
-->
<!--
测试环境
-->
<profile>
<id>
test
</id>
<activation>
<activeByDefault>
false
</activeByDefault>
</activation>
<properties>
<
profileName>
test
</profileNam
e>
<
spring.profiles.active>
test
</spring.profiles.activ
e>
</properties>
</profile>
<!--
生产环境
-->
<!--
生产环境
-->
<profile>
<id>
prod
</id>
<activation>
<activeByDefault>
false
</activeByDefault>
</activation>
<properties>
<
profileName>
prod
</profileNam
e>
<
spring.profiles.active>
prod
</spring.profiles.activ
e>
</properties>
</profile>
</profiles>
</project>
src/main/java/com/template/TemplateApplication.java
浏览文件 @
56eff32a
...
...
@@ -3,7 +3,7 @@ package com.template;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
(
scanBasePackages
=
{
"com.
skygod.base"
,
"com.skygod.usermanagement
"
})
@SpringBootApplication
(
scanBasePackages
=
{
"com.
template
"
})
public
class
TemplateApplication
{
public
static
void
main
(
String
[]
args
)
{
...
...
src/main/java/com/template/config/MybatisPlusConfig
浏览文件 @
56eff32a
...
...
@@ -7,8 +7,9 @@ import org.mybatis.spring.annotation.MapperScan;
import
org
.
springframework
.
context
.
annotation
.
Bean
;
import
org
.
springframework
.
context
.
annotation
.
Configuration
;
@
Configuration
@
MapperScan
(
basePackages
=
"com.template.*.mapper"
)
//
注意启动该配置项需要在
pom
中取消
mybatisplus
、
druid
等依赖的注释,同时必须配置数据源否则启动报错
//
@
Configuration
//
@
MapperScan
(
basePackages
=
"com.template.*.mapper"
)
public
class
MybatisPlusConfig
{
@
Bean
...
...
src/main/java/com/template/controller/TestController.java
浏览文件 @
56eff32a
package
com.template.controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@Api
(
tags
=
"测试服务"
)
@RestController
@RequestMapping
(
"/test"
)
public
class
TestController
{
@Value
(
"${env}"
)
private
String
env
;
@GetMapping
(
"/getEnv"
)
@ApiOperation
(
"查询当前环境"
)
public
String
getEnv
(){
return
env
;
}
}
src/main/resources/application-dev.yml
浏览文件 @
56eff32a
server
:
servlet
:
context-path
:
/dev
\ No newline at end of file
env
:
"
开发环境"
\ No newline at end of file
src/main/resources/application-prod.yml
浏览文件 @
56eff32a
server
:
servlet
:
context-path
:
/prod
\ No newline at end of file
env
:
"
生产环境"
\ No newline at end of file
src/main/resources/application-test.yml
浏览文件 @
56eff32a
server
:
servlet
:
context-path
:
/test
\ No newline at end of file
env
:
"
验收环境"
\ No newline at end of file
src/main/resources/application.yml
浏览文件 @
56eff32a
server
:
port
:
8081
\ No newline at end of file
port
:
8081
servlet
:
context-path
:
/springboot-template
spring
:
# swagger配置
mvc
:
pathmatch
:
matching-strategy
:
ant_path_matcher
profiles
:
active
:
@
spring.profiles.active@
\ No newline at end of file
target/classes/application-dev.yml
0 → 100644
浏览文件 @
56eff32a
env
:
"
开发环境"
\ No newline at end of file
target/classes/application-prod.yml
0 → 100644
浏览文件 @
56eff32a
env
:
"
生产环境"
\ No newline at end of file
target/classes/application-test.yml
0 → 100644
浏览文件 @
56eff32a
env
:
"
验收环境"
\ No newline at end of file
target/classes/application.yml
0 → 100644
浏览文件 @
56eff32a
server
:
port
:
8081
servlet
:
context-path
:
/springboot-template
spring
:
# swagger配置
mvc
:
pathmatch
:
matching-strategy
:
ant_path_matcher
profiles
:
active
:
dev
\ No newline at end of file
target/classes/com/template/TemplateApplication.class
0 → 100644
浏览文件 @
56eff32a
文件已添加
target/classes/com/template/config/SwaggerConfig.class
0 → 100644
浏览文件 @
56eff32a
文件已添加
target/classes/com/template/config/WebMvcConfiguration.class
0 → 100644
浏览文件 @
56eff32a
文件已添加
target/classes/com/template/controller/TestController.class
0 → 100644
浏览文件 @
56eff32a
文件已添加
target/maven-archiver/pom.properties
0 → 100644
浏览文件 @
56eff32a
artifactId
=
springboot-template
groupId
=
com.test
version
=
0.0.1-SNAPSHOT
target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
0 → 100644
浏览文件 @
56eff32a
com/template/config/SwaggerConfig.class
com/template/controller/TestController.class
com/template/TemplateApplication.class
com/template/config/WebMvcConfiguration.class
target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
0 → 100644
浏览文件 @
56eff32a
/root/springboot-template/src/main/java/com/template/config/WebMvcConfiguration.java
/root/springboot-template/src/main/java/com/template/config/SwaggerConfig.java
/root/springboot-template/src/main/java/com/template/controller/TestController.java
/root/springboot-template/src/main/java/com/template/TemplateApplication.java
target/springboot-template-0.0.1-SNAPSHOT.jar
0 → 100644
浏览文件 @
56eff32a
文件已添加
target/springboot-template-0.0.1-SNAPSHOT.jar.original
0 → 100644
浏览文件 @
56eff32a
文件已添加
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录