diff --git a/README.md b/README.md index cdc58dcffc266dc4620a92a49196c9c852a1d205..43088be5aefbcbe28a3761d5c8ea1b962ad3301f 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,5 @@ SpringBoot应用集合 - [Springboot设置banner](https://gitee.com/superbutton/SpringBoot-Components/tree/develop/Springboot-Banner) - [Springboot配置全局异常](https://gitee.com/superbutton/SpringBoot-Components/tree/develop/Springboot-Exception) - [SpringBoot集成阿里巴巴Druid监控](https://gitee.com/superbutton/SpringBoot-Components/tree/develop/Springboot-Druid) -- [SpringBoot整合Httpclient](https://gitee.com/superbutton/SpringBoot-Components/tree/develop/Springboot-Httpclient) \ No newline at end of file +- [SpringBoot整合Httpclient](https://gitee.com/superbutton/SpringBoot-Components/tree/develop/Springboot-Httpclient) +- [SpringBoot-Admin实现监控](https://gitee.com/superbutton/SpringBoot-Components/tree/develop/SpringBoot-Admin-Parent) \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/README.MD b/SpringBoot-Admin-Parent/README.MD new file mode 100644 index 0000000000000000000000000000000000000000..0a51a6d9bfcbb55a2b0bc102d2b4f062244b7298 --- /dev/null +++ b/SpringBoot-Admin-Parent/README.MD @@ -0,0 +1 @@ +# 本案例主要实现SpringBoot Admin监控功能及邮件通知 \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/README.MD b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/README.MD new file mode 100644 index 0000000000000000000000000000000000000000..aaabd9c5848539ac86d0e9b2942d80c71577bca7 --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/README.MD @@ -0,0 +1,2 @@ +# SpringBoot Admin监控端 +客户端接口访问地址: http://localhost:8081/getInfo \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/pom.xml b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..9d878d1b3787459440c7b9219dc5f548cf7cb8ed --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/pom.xml @@ -0,0 +1,19 @@ + + 4.0.0 + + com.button + SpringBoot-Admin-Parent + 0.0.1-SNAPSHOT + + SpringBoot-Admin-Client + + + + de.codecentric + spring-boot-admin-starter-client + 2.0.6 + + + \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/src/main/java/com/button/admin/AdminClientController.java b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/src/main/java/com/button/admin/AdminClientController.java new file mode 100644 index 0000000000000000000000000000000000000000..dd9966a1467908a0b92ecb3c98467be0cd17bbc2 --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/src/main/java/com/button/admin/AdminClientController.java @@ -0,0 +1,13 @@ +package com.button.admin; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class AdminClientController { + + @GetMapping(value = "getInfo") + public String getInfo() { + return "Admin Client!!"; + } +} diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/src/main/java/com/button/admin/SpringBootAdminClient.java b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/src/main/java/com/button/admin/SpringBootAdminClient.java new file mode 100644 index 0000000000000000000000000000000000000000..52d84739169563dcf240a2a3b4400b3a9958a03e --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/src/main/java/com/button/admin/SpringBootAdminClient.java @@ -0,0 +1,29 @@ +package com.button.admin; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; + +@EnableAutoConfiguration +@SpringBootApplication +public class SpringBootAdminClient { + public static void main(String[] args) { + SpringApplication.run(SpringBootAdminClient.class, args); + } + + /** + * + * 类名称 : SecurityPassAllConfig
+ * 功能描述: spring-boot-starter-security引入这个包,默认会把所有的请求都给拦截下来,需要进行验证,这里我们将所有请求都放行了 + */ + @Configuration + public static class SecurityPassAllConfig extends WebSecurityConfigurerAdapter { + @Override + protected void configure(HttpSecurity http) throws Exception{ + http.authorizeRequests().anyRequest().permitAll().and().csrf().disable(); + } + } +} diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/src/main/resources/application.yml b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/src/main/resources/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..ce42e0f4a7c46b9ed4eb3b5b1fa546919f964922 --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/src/main/resources/application.yml @@ -0,0 +1,31 @@ +server: + port: 8081 + +spring: + application: + name: admin-client + security: + user: + name: admin + password: admin + boot: + admin: + client: + url: http://192.168.1.16:8080 + username: admin + password: admin + instance: + metadata: + user: + name: admin + password: admin +management: + security: + enabled: false + endpoints: + web: + exposure: + include: "*" # 开放所有页面节点 默认只开启了health、info两个节点 + endpoint: + health: + show-details: ALWAYS # 显示健康具体信息 默认不会显示详细信息 \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/src/main/resources/logback.xml b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/src/main/resources/logback.xml new file mode 100644 index 0000000000000000000000000000000000000000..bfc81a0bf8a284d3a29020f866c33dde179a89f1 --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/src/main/resources/logback.xml @@ -0,0 +1,37 @@ + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} -%msg%n + + + + + ${LOG_HOME}/admin_client.log + + + + ${LOG_HOME}/admin_client.log.%d{yyyy-MM-dd}.%i.log + + + + 100MB + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{50} -%msg%n + + + + + + + + + \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/META-INF/MANIFEST.MF b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000000000000000000000000000000..1af55c4b07ae85896ebbf4251a4a9d5bfceaabaf --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/META-INF/MANIFEST.MF @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Implementation-Title: SpringBoot-Admin-Client +Implementation-Version: 0.0.1-SNAPSHOT +Built-By: Hanghang +Implementation-Vendor-Id: com.button +Build-Jdk: 1.8.0_151 +Implementation-URL: https://projects.spring.io/spring-boot/#/spring-bo + ot-starter-parent/SpringBoot-Admin-Parent/SpringBoot-Admin-Client +Created-By: Maven Integration for Eclipse + diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/META-INF/maven/com.button/SpringBoot-Admin-Client/pom.properties b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/META-INF/maven/com.button/SpringBoot-Admin-Client/pom.properties new file mode 100644 index 0000000000000000000000000000000000000000..25b7cd83f788b5e1459406f39a5097427e9a54bd --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/META-INF/maven/com.button/SpringBoot-Admin-Client/pom.properties @@ -0,0 +1,7 @@ +#Generated by Maven Integration for Eclipse +#Mon Sep 30 14:21:56 CST 2019 +version=0.0.1-SNAPSHOT +groupId=com.button +m2e.projectName=SpringBoot-Admin-Client +m2e.projectLocation=F\:\\chexian-git\\work\\SpringBoot-Admin-Parent\\SpringBoot-Admin-Client +artifactId=SpringBoot-Admin-Client diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/META-INF/maven/com.button/SpringBoot-Admin-Client/pom.xml b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/META-INF/maven/com.button/SpringBoot-Admin-Client/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..9d878d1b3787459440c7b9219dc5f548cf7cb8ed --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/META-INF/maven/com.button/SpringBoot-Admin-Client/pom.xml @@ -0,0 +1,19 @@ + + 4.0.0 + + com.button + SpringBoot-Admin-Parent + 0.0.1-SNAPSHOT + + SpringBoot-Admin-Client + + + + de.codecentric + spring-boot-admin-starter-client + 2.0.6 + + + \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/application.yml b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..ce42e0f4a7c46b9ed4eb3b5b1fa546919f964922 --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/application.yml @@ -0,0 +1,31 @@ +server: + port: 8081 + +spring: + application: + name: admin-client + security: + user: + name: admin + password: admin + boot: + admin: + client: + url: http://192.168.1.16:8080 + username: admin + password: admin + instance: + metadata: + user: + name: admin + password: admin +management: + security: + enabled: false + endpoints: + web: + exposure: + include: "*" # 开放所有页面节点 默认只开启了health、info两个节点 + endpoint: + health: + show-details: ALWAYS # 显示健康具体信息 默认不会显示详细信息 \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/com/button/admin/AdminClientController.class b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/com/button/admin/AdminClientController.class new file mode 100644 index 0000000000000000000000000000000000000000..739e7789d3c07df6e1b178e6a4f928ae6a886379 Binary files /dev/null and b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/com/button/admin/AdminClientController.class differ diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/com/button/admin/SpringBootAdminClient$SecurityPassAllConfig.class b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/com/button/admin/SpringBootAdminClient$SecurityPassAllConfig.class new file mode 100644 index 0000000000000000000000000000000000000000..11780e27d900e7a543b3e5fdd8bc2992ca42807f Binary files /dev/null and b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/com/button/admin/SpringBootAdminClient$SecurityPassAllConfig.class differ diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/com/button/admin/SpringBootAdminClient.class b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/com/button/admin/SpringBootAdminClient.class new file mode 100644 index 0000000000000000000000000000000000000000..618bcbb7510eb8d4ceafe8bc64b192e82e262223 Binary files /dev/null and b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/com/button/admin/SpringBootAdminClient.class differ diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/logback.xml b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/logback.xml new file mode 100644 index 0000000000000000000000000000000000000000..bfc81a0bf8a284d3a29020f866c33dde179a89f1 --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Client/target/classes/logback.xml @@ -0,0 +1,37 @@ + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} -%msg%n + + + + + ${LOG_HOME}/admin_client.log + + + + ${LOG_HOME}/admin_client.log.%d{yyyy-MM-dd}.%i.log + + + + 100MB + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{50} -%msg%n + + + + + + + + + \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/README.MD b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/README.MD new file mode 100644 index 0000000000000000000000000000000000000000..bcba29bdd80998bed25fdf9eea411e5fbd6d44ad --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/README.MD @@ -0,0 +1,4 @@ +# SpringBoot Admin服务端 +访问地址:http://localhost:8080 +username: admin +password: admin \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/pom.xml b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..5c0d368e009b596cf391424841973319984284f1 --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/pom.xml @@ -0,0 +1,24 @@ + + 4.0.0 + + com.button + SpringBoot-Admin-Parent + 0.0.1-SNAPSHOT + + SpringBoot-Admin-Server + + + + + de.codecentric + spring-boot-admin-starter-server + 2.0.6 + + + org.springframework.boot + spring-boot-starter-mail + + + \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/java/com/button/admin/SpringBootAdminServer.java b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/java/com/button/admin/SpringBootAdminServer.java new file mode 100644 index 0000000000000000000000000000000000000000..1caedebd1252ddeffb8c7ca5067e645e52349b6f --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/java/com/button/admin/SpringBootAdminServer.java @@ -0,0 +1,14 @@ +package com.button.admin; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +import de.codecentric.boot.admin.server.config.EnableAdminServer; + +@EnableAdminServer +@SpringBootApplication +public class SpringBootAdminServer { + public static void main(String[] args) { + SpringApplication.run(SpringBootAdminServer.class, args); + } +} diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/java/com/button/admin/notify/CustomNotifier.java b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/java/com/button/admin/notify/CustomNotifier.java new file mode 100644 index 0000000000000000000000000000000000000000..53446c9672c335fe083937b241c319e4e67324c7 --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/java/com/button/admin/notify/CustomNotifier.java @@ -0,0 +1,58 @@ +package com.button.admin.notify; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +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.domain.events.InstanceStatusChangedEvent; +import de.codecentric.boot.admin.server.notify.AbstractStatusChangeNotifier; +import reactor.core.publisher.Mono; + +@Component +public class CustomNotifier extends AbstractStatusChangeNotifier { + private static final Logger LOGGER = LoggerFactory.getLogger(CustomNotifier.class); + + public CustomNotifier(InstanceRepository repository) { + super(repository); + } + + @Override + protected Mono doNotify(InstanceEvent event, Instance instance) { + return Mono.fromRunnable(() -> { + if (event instanceof InstanceStatusChangedEvent) { + LOGGER.info("Instance {} ({}) is {}", instance.getRegistration().getName(), event.getInstance(), + ((InstanceStatusChangedEvent) event).getStatusInfo().getStatus()); + + String status = ((InstanceStatusChangedEvent) event).getStatusInfo().getStatus(); + + switch (status) { + // 健康检查没通过 + case "DOWN": + LOGGER.info("发送 健康检查没通过 的通知!"); + break; + // 服务离线 + case "OFFLINE": + LOGGER.info("发送 服务离线 的通知!"); + break; + // 服务上线 + case "UP": + LOGGER.info("发送 服务上线 的通知!"); + break; + // 服务未知异常 + case "UNKNOWN": + LOGGER.info("发送 服务未知异常 的通知!"); + break; + default: + break; + } + + } else { + LOGGER.info("Instance {} ({}) {}", instance.getRegistration().getName(), event.getInstance(), + event.getType()); + } + }); + } +} diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/java/com/button/admin/security/SecuritySecureConfig.java b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/java/com/button/admin/security/SecuritySecureConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..7c6c309b4a958621c39f74eab9907427a0fd905d --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/java/com/button/admin/security/SecuritySecureConfig.java @@ -0,0 +1,45 @@ +package com.button.admin.security; + +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler; +import org.springframework.security.web.csrf.CookieCsrfTokenRepository; + +import de.codecentric.boot.admin.server.config.AdminServerProperties; + +@Configuration +public class SecuritySecureConfig extends WebSecurityConfigurerAdapter { + + private final String adminContextPath; + + public SecuritySecureConfig(AdminServerProperties adminServerProperties) { + this.adminContextPath = adminServerProperties.getContextPath(); + } + + @Override + protected void configure(HttpSecurity http) throws Exception { + // @formatter:off + SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler(); + successHandler.setTargetUrlParameter("redirectTo"); + successHandler.setDefaultTargetUrl(adminContextPath + "/"); + + + http.authorizeRequests() // 授予对所有静态资产和登录页面的公共访问权限。 + .antMatchers(adminContextPath + "/assets/**").permitAll().antMatchers(adminContextPath + "/login").permitAll() // 必须对每个其他请求进行身份验证 + .anyRequest().authenticated().and() // 配置登录和注销 + .formLogin().loginPage(adminContextPath + "/login").successHandler(successHandler).and() + .logout().logoutUrl(adminContextPath + "/logout").and() // 启用HTTP-Basic支持。这是Spring + // BootAdmin + // Client注册所必需的 + .httpBasic().and(); + + http.authorizeRequests().antMatchers(adminContextPath + "/assets/**").permitAll() + .antMatchers(adminContextPath + "/login").permitAll().anyRequest().authenticated().and().formLogin() + .loginPage(adminContextPath + "/login").successHandler(successHandler).and().logout() + .logoutUrl(adminContextPath + "/logout").and().httpBasic().and().csrf() + .csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse()) + .ignoringAntMatchers(adminContextPath + "/instances", adminContextPath + "/actuator/**"); + } + +} diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/resources/application.yml b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/resources/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..8851d8a8788707ffadebc741ed0858237d073f11 --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/resources/application.yml @@ -0,0 +1,33 @@ +server: + port: 8080 + +spring: + application: + name: admin-server + security: + user: + name: admin + password: admin + basic: + enabled: false #关掉security框架自带的登陆弹出框 + boot: + admin: + client: + username: admin + password: admin + notify: + mail: + from: 18292095875@163.com + to: 2740277548@qq.com + mail: + host: smtp.163.com + username: 18292095875@163.com + password: zhZH940126 + properties: + mail: + smtp: + auth: true + starttls: + enable: true + required: true + \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/resources/logback.xml b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/resources/logback.xml new file mode 100644 index 0000000000000000000000000000000000000000..9f54cebab28301c81d70aacbf74d3cc3c8162b74 --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/src/main/resources/logback.xml @@ -0,0 +1,37 @@ + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} -%msg%n + + + + + ${LOG_HOME}/admin_server.log + + + + ${LOG_HOME}/admin_server.log.%d{yyyy-MM-dd}.%i.log + + + + 100MB + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{50} -%msg%n + + + + + + + + + \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/META-INF/MANIFEST.MF b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000000000000000000000000000000..8e3613d77556bbcb6e78ad5e70191e378a78ff74 --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/META-INF/MANIFEST.MF @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Implementation-Title: SpringBoot-Admin-Server +Implementation-Version: 0.0.1-SNAPSHOT +Built-By: Hanghang +Implementation-Vendor-Id: com.button +Build-Jdk: 1.8.0_151 +Implementation-URL: https://projects.spring.io/spring-boot/#/spring-bo + ot-starter-parent/SpringBoot-Admin-Parent/SpringBoot-Admin-Server +Created-By: Maven Integration for Eclipse + diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/META-INF/maven/com.button/SpringBoot-Admin-Server/pom.properties b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/META-INF/maven/com.button/SpringBoot-Admin-Server/pom.properties new file mode 100644 index 0000000000000000000000000000000000000000..3fe9fe74366056d0f125b0e404babb8b44f4aa2e --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/META-INF/maven/com.button/SpringBoot-Admin-Server/pom.properties @@ -0,0 +1,7 @@ +#Generated by Maven Integration for Eclipse +#Mon Sep 30 14:22:00 CST 2019 +version=0.0.1-SNAPSHOT +groupId=com.button +m2e.projectName=SpringBoot-Admin-Server +m2e.projectLocation=F\:\\chexian-git\\work\\SpringBoot-Admin-Parent\\SpringBoot-Admin-Server +artifactId=SpringBoot-Admin-Server diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/META-INF/maven/com.button/SpringBoot-Admin-Server/pom.xml b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/META-INF/maven/com.button/SpringBoot-Admin-Server/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..5c0d368e009b596cf391424841973319984284f1 --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/META-INF/maven/com.button/SpringBoot-Admin-Server/pom.xml @@ -0,0 +1,24 @@ + + 4.0.0 + + com.button + SpringBoot-Admin-Parent + 0.0.1-SNAPSHOT + + SpringBoot-Admin-Server + + + + + de.codecentric + spring-boot-admin-starter-server + 2.0.6 + + + org.springframework.boot + spring-boot-starter-mail + + + \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/application.yml b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..8851d8a8788707ffadebc741ed0858237d073f11 --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/application.yml @@ -0,0 +1,33 @@ +server: + port: 8080 + +spring: + application: + name: admin-server + security: + user: + name: admin + password: admin + basic: + enabled: false #关掉security框架自带的登陆弹出框 + boot: + admin: + client: + username: admin + password: admin + notify: + mail: + from: 18292095875@163.com + to: 2740277548@qq.com + mail: + host: smtp.163.com + username: 18292095875@163.com + password: zhZH940126 + properties: + mail: + smtp: + auth: true + starttls: + enable: true + required: true + \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/com/button/admin/SpringBootAdminServer.class b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/com/button/admin/SpringBootAdminServer.class new file mode 100644 index 0000000000000000000000000000000000000000..9a9c7b5d43cb0e72dae8a98865c8a25c4cefa3c5 Binary files /dev/null and b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/com/button/admin/SpringBootAdminServer.class differ diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/com/button/admin/notify/CustomNotifier.class b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/com/button/admin/notify/CustomNotifier.class new file mode 100644 index 0000000000000000000000000000000000000000..e0e96502d9f8250c7c7fbda549e37311684a5c73 Binary files /dev/null and b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/com/button/admin/notify/CustomNotifier.class differ diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/com/button/admin/security/SecuritySecureConfig.class b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/com/button/admin/security/SecuritySecureConfig.class new file mode 100644 index 0000000000000000000000000000000000000000..81d147951b619bb10170a3e9a7ead1b021c647d5 Binary files /dev/null and b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/com/button/admin/security/SecuritySecureConfig.class differ diff --git a/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/logback.xml b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/logback.xml new file mode 100644 index 0000000000000000000000000000000000000000..9f54cebab28301c81d70aacbf74d3cc3c8162b74 --- /dev/null +++ b/SpringBoot-Admin-Parent/SpringBoot-Admin-Server/target/classes/logback.xml @@ -0,0 +1,37 @@ + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} -%msg%n + + + + + ${LOG_HOME}/admin_server.log + + + + ${LOG_HOME}/admin_server.log.%d{yyyy-MM-dd}.%i.log + + + + 100MB + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{50} -%msg%n + + + + + + + + + \ No newline at end of file diff --git a/SpringBoot-Admin-Parent/pom.xml b/SpringBoot-Admin-Parent/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..479ea9b17894424412235b5092583717d7cfdd67 --- /dev/null +++ b/SpringBoot-Admin-Parent/pom.xml @@ -0,0 +1,63 @@ + + 4.0.0 + com.button + SpringBoot-Admin-Parent + 0.0.1-SNAPSHOT + pom + + + org.springframework.boot + spring-boot-starter-parent + 2.0.1.RELEASE + + + + + UTF-8 + UTF-8 + 1.8 + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-actuator + + + + org.jolokia + jolokia-core + + + org.springframework.boot + spring-boot-devtools + true + true + + + + + + org.springframework.boot + spring-boot-maven-plugin + + -Dfile.encoding=UTF-8 + true + + + + + + SpringBoot-Admin-Server + SpringBoot-Admin-Client + + \ No newline at end of file