Skip to content

Commit 7717612

Browse files
committed
删除idea自动生成无用代码并更新版本
1 parent bdb5df2 commit 7717612

File tree

10 files changed

+224
-0
lines changed

10 files changed

+224
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.springframework.boot</groupId>
7+
<artifactId>spring-boot-starter-parent</artifactId>
8+
<version>2.2.5.RELEASE</version>
9+
<relativePath/> <!-- lookup parent from repository -->
10+
</parent>
11+
<groupId>com.example</groupId>
12+
<artifactId>admin-client</artifactId>
13+
<version>0.0.1-SNAPSHOT</version>
14+
<name>Spring-Boot-Admin-Client</name>
15+
<description>Demo project for Spring Boot</description>
16+
17+
<properties>
18+
<java.version>1.8</java.version>
19+
</properties>
20+
21+
<dependencies>
22+
<dependency>
23+
<groupId>org.springframework.boot</groupId>
24+
<artifactId>spring-boot-starter-web</artifactId>
25+
</dependency>
26+
<dependency>
27+
<groupId>de.codecentric</groupId>
28+
<artifactId>spring-boot-admin-starter-client</artifactId>
29+
<version>2.2.2</version>
30+
</dependency>
31+
<dependency>
32+
<groupId>org.springframework.boot</groupId>
33+
<artifactId>spring-boot-starter-test</artifactId>
34+
<scope>test</scope>
35+
<exclusions>
36+
<exclusion>
37+
<groupId>org.junit.vintage</groupId>
38+
<artifactId>junit-vintage-engine</artifactId>
39+
</exclusion>
40+
</exclusions>
41+
</dependency>
42+
</dependencies>
43+
44+
<build>
45+
<plugins>
46+
<plugin>
47+
<groupId>org.springframework.boot</groupId>
48+
<artifactId>spring-boot-maven-plugin</artifactId>
49+
</plugin>
50+
</plugins>
51+
</build>
52+
53+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.example.client;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
@SpringBootApplication
7+
public class SpringBootAdminClientApplication {
8+
9+
public static void main(String[] args) {
10+
SpringApplication.run(SpringBootAdminClientApplication.class, args);
11+
}
12+
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
management:
2+
endpoint:
3+
shutdown:
4+
enabled: true
5+
health:
6+
show-details: always
7+
endpoints:
8+
web:
9+
exposure:
10+
include: '*'
11+
spring:
12+
boot:
13+
admin:
14+
client:
15+
instance:
16+
service-base-url: http://localhost:8081/
17+
url: http://localhost:8080/admin-server #服务端监控地址
18+
server:
19+
port: 8081
20+
info:
21+
app:
22+
name: "@project.name@"
23+
description: "@project.description@"
24+
version: "@project.version@"
25+
spring-boot-version: "@project.parent.version@"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.example.client;
2+
3+
import org.junit.jupiter.api.Test;
4+
import org.springframework.boot.test.context.SpringBootTest;
5+
6+
@SpringBootTest
7+
class SpringBootAdminClientApplicationTests {
8+
9+
@Test
10+
void contextLoads() {
11+
}
12+
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.springframework.boot</groupId>
7+
<artifactId>spring-boot-starter-parent</artifactId>
8+
<version>2.2.5.RELEASE</version>
9+
<relativePath/> <!-- lookup parent from repository -->
10+
</parent>
11+
<groupId>com.example</groupId>
12+
<artifactId>admin-server</artifactId>
13+
<version>0.0.1-SNAPSHOT</version>
14+
<name>Spring-Boot-Admin-Server</name>
15+
<description>Demo project for Spring Boot</description>
16+
17+
<properties>
18+
<java.version>1.8</java.version>
19+
</properties>
20+
21+
<dependencies>
22+
<dependency>
23+
<groupId>org.springframework.boot</groupId>
24+
<artifactId>spring-boot-starter-web</artifactId>
25+
</dependency>
26+
<dependency>
27+
<groupId>de.codecentric</groupId>
28+
<artifactId>spring-boot-admin-server</artifactId>
29+
<version>2.2.2</version>
30+
</dependency>
31+
<dependency>
32+
<groupId>de.codecentric</groupId>
33+
<artifactId>spring-boot-admin-server-ui</artifactId>
34+
<version>2.2.2</version>
35+
</dependency>
36+
<dependency>
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-starter-mail</artifactId>
39+
</dependency>
40+
<dependency>
41+
<groupId>org.springframework.boot</groupId>
42+
<artifactId>spring-boot-starter-test</artifactId>
43+
<scope>test</scope>
44+
<exclusions>
45+
<exclusion>
46+
<groupId>org.junit.vintage</groupId>
47+
<artifactId>junit-vintage-engine</artifactId>
48+
</exclusion>
49+
</exclusions>
50+
</dependency>
51+
</dependencies>
52+
53+
<build>
54+
<plugins>
55+
<plugin>
56+
<groupId>org.springframework.boot</groupId>
57+
<artifactId>spring-boot-maven-plugin</artifactId>
58+
</plugin>
59+
</plugins>
60+
</build>
61+
62+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.example.server;
2+
3+
import de.codecentric.boot.admin.server.config.EnableAdminServer;
4+
import org.springframework.boot.SpringApplication;
5+
import org.springframework.boot.autoconfigure.SpringBootApplication;
6+
7+
@EnableAdminServer
8+
@SpringBootApplication
9+
public class SpringBootAdminServerApplication {
10+
11+
public static void main(String[] args) {
12+
SpringApplication.run(SpringBootAdminServerApplication.class, args);
13+
}
14+
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
server:
2+
servlet:
3+
context-path: /admin-server
4+
port: 8080
5+
spring:
6+
mail:
7+
host: smtp.qq.com #发送邮件服务器
8+
username: [email protected] #QQ邮箱
9+
#授权码参考:https://service.mail.qq.com/cgi-bin/help?subtype=1&&no=1001256&&id=28
10+
password: xxx #客户端授权码
11+
protocol: smtp #发送邮件协议
12+
default-encoding: utf-8 #编码格式
13+
properties:
14+
mail:
15+
smtp:
16+
auth: true #开启认证
17+
port: 465 #端口号465(开启SSL时)或587(不开启SSL时)
18+
ssl:
19+
enable: true #开启SSL(使用587端口时无法连接QQ邮件服务器)
20+
starttls:
21+
enable: true #需要TLS认证 保证发送邮件安全验证
22+
required: true
23+
boot:
24+
admin:
25+
notify:
26+
mail:
27+
from: [email protected] #发送方邮箱
28+
to: [email protected] #接收方邮箱
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.example.server;
2+
3+
import org.junit.jupiter.api.Test;
4+
import org.springframework.boot.test.context.SpringBootTest;
5+
6+
@SpringBootTest
7+
class SpringBootAdminServerApplicationTests {
8+
9+
@Test
10+
void contextLoads() {
11+
}
12+
13+
}

0 commit comments

Comments
 (0)