Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
9b7c838b
Commit
9b7c838b
authored
Apr 17, 2020
by
邓实川
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SpringBoot actuator 监控
parent
5a568472
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
17 deletions
+44
-17
pom.xml
+16
-6
src/main/java/cn/timer/api/config/interceptor/WebSecurityConfig.java
+1
-0
src/main/java/cn/timer/api/config/quartz/BaseJob.java
+7
-7
src/main/java/cn/timer/api/controller/LoginController.java
+0
-4
src/main/resources/application-dev.yml
+20
-0
No files found.
pom.xml
View file @
9b7c838b
...
...
@@ -11,9 +11,9 @@
</parent>
<groupId>
cn.8timer
</groupId>
<artifactId>
8timerV200
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
v0.4-beta
</version>
<name>
8timerV200
</name>
<description>
Demo project for Spring Boot
</description>
<description>
8小时人事管家2.0
</description>
<profiles>
<profile>
...
...
@@ -78,6 +78,16 @@
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<!-- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency> -->
<!-- 添加MySQL依赖 -->
<dependency>
...
...
@@ -309,16 +319,16 @@
</dependency>
<!--springboot-quartz -->
<dependency>
<
!-- <
dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
</dependency>
</dependency>
-->
<!--Quartz 使用的连接池 这里Quartz在持久化任务时使用该jar -->
<dependency>
<
!-- <
dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.5.2</version>
</dependency>
</dependency>
-->
<!-- pdf -->
...
...
src/main/java/cn/timer/api/config/interceptor/WebSecurityConfig.java
View file @
9b7c838b
...
...
@@ -35,6 +35,7 @@ public class WebSecurityConfig implements WebMvcConfigurer {
//.excludePathPatterns("/")
registry
.
addInterceptor
(
getSessionInterceptor
())
.
addPathPatterns
(
"/**"
)
.
excludePathPatterns
(
"/actuator/*"
)
.
excludePathPatterns
(
"/doc*"
)
.
excludePathPatterns
(
"/v2/**"
)
.
excludePathPatterns
(
"/**/*.js"
)
...
...
src/main/java/cn/timer/api/config/quartz/BaseJob.java
View file @
9b7c838b
package
cn
.
timer
.
api
.
config
.
quartz
;
import
org.quartz.Job
;
import
org.quartz.JobExecutionContext
;
import
org.quartz.JobExecutionException
;
public
interface
BaseJob
extends
Job
{
public
void
execute
(
JobExecutionContext
context
)
throws
JobExecutionException
;
}
//
import org.quartz.Job;
//
import org.quartz.JobExecutionContext;
//
import org.quartz.JobExecutionException;
//
//
public interface BaseJob extends Job {
//
public void execute(JobExecutionContext context) throws JobExecutionException;
//
}
src/main/java/cn/timer/api/controller/LoginController.java
View file @
9b7c838b
...
...
@@ -10,7 +10,6 @@ import javax.servlet.http.HttpSession;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.env.Environment
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -53,9 +52,6 @@ import io.swagger.annotations.ApiOperation;
@Transactional
@RequestMapping
(
value
=
"/login"
,
produces
=
{
"application/json"
})
public
class
LoginController
{
@Autowired
private
Environment
env
;
@Value
(
"${configtest.patht}"
)
public
String
port
;
...
...
src/main/resources/application-dev.yml
View file @
9b7c838b
...
...
@@ -85,6 +85,26 @@ spring:
height
:
76
# Height of the banner image in chars (default based on image height).
margin
:
2
# Left hand image margin in chars.
invert
:
false
# Whether images should be inverted for dark terminal themes.
######### Spring boot应用健康监控
management
:
endpoints
:
web
:
exposure
:
include
:
"
*"
# 开启暴露所有的endpoint
endpoint
:
health
:
show-details
:
always
# 显示健康具体信息 默认不会显示详细信息
# INFO ENDPOINT CONFIGURATION
info
:
app
:
name
:
'
@project.name@'
description
:
'
@project.description@'
version
:
'
@project.version@'
encoding
:
'
@project.build.sourceEncoding@'
java
:
version
:
'
@java.version@'
##############################
# mybatis-plus
mybatis-plus
:
...
...
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