Commit 93ab3d98 authored by 张大伟's avatar 张大伟

init

parents
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
### VS Code ###
.vscode/
<?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>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.7.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.isoft91</groupId>
<artifactId>springbootadminserver</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>springbootadminserver</name>
<description>Spring Boot Admin Server</description>
<properties>
<java.version>1.8</java.version>
<spring-boot-admin.version>2.1.5</spring-boot-admin.version>
</properties>
<dependencies>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-dependencies</artifactId>
<version>${spring-boot-admin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
package com.isoft91.springbootadminserver;
import de.codecentric.boot.admin.server.domain.entities.Instance;
import de.codecentric.boot.admin.server.domain.entities.InstanceRepository;
import de.codecentric.boot.admin.server.domain.events.InstanceEvent;
import de.codecentric.boot.admin.server.notify.AbstractStatusChangeNotifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import reactor.core.publisher.Mono;
/**
* 自定义通知
*/
//@Component
//@ConfigurationProperties("okong.custom.notify")
//public class CustomNotifier extends AbstractStatusChangeNotifier {
//
// public CustomNotifier(InstanceRepository repository) {
// super(repository);
// }
//
// @Override
// protected Mono<Void> doNotify(InstanceEvent instanceEvent, Instance instance) {
// return null;
// }
//}
\ No newline at end of file
package com.isoft91.springbootadminserver;
import de.codecentric.boot.admin.server.config.EnableAdminServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Configuration;
@Configuration
@EnableAutoConfiguration
@EnableAdminServer
public class SpringbootadminserverApplication {
public static void main(String[] args) {
SpringApplication.run(SpringbootadminserverApplication.class, args);
}
}
server.port=8788
# 邮件相关
# SMTP服务器地址
spring.mail.host=smtp.qq.com
# SMTP服务器端口号 默认-1
# spring.mail.port=-1
# 发送方帐号
spring.mail.username=990860210@qq.com
# 发送方密码(授权码)
spring.mail.password=tdbyeeeywrahbdjj
#javaMailProperties 配置
# 开启用户身份验证
spring.mail.properties.mail.smtp.auth=true
# 发送给谁
spring.boot.admin.notify.mail.to=zhangdawei@91isoft.com
# 谁发的
spring.boot.admin.notify.mail.from=990860210@qq.com
\ No newline at end of file
package com.isoft91.springbootadminserver;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringbootadminserverApplicationTests {
@Test
public void contextLoads() {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment