我正在尝试替换默认的图标和主页 svg。我把它们放在资源中:
assets/img/my-logo.svg
favicon.ico
Run Code Online (Sandbox Code Playgroud)
并在 application.yml 中
spring.boot.admin.ui.brand: "<img src='assets/img/my-logo.svg'><span>MyBoot Monitor</span>"
Run Code Online (Sandbox Code Playgroud)
仍然显示 404 错误。
更新:我意识到 favicon 不能像那样被替换..但是, spring.boot.admin.ui.brand 应该像参考文献中提到的那样工作..请帮忙..
我正在关注此博客以试用 Spring-Boot-Admin 应用程序。当我运行应用程序时,它失败并显示以下错误:
Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'adminHandlerMapping' defined in class path resource [de/codecentric/boot/admin/server/config/AdminServerWebConfiguration$ServletRestApiConfirguation.class]:
Invocation of init method failed; nested exception is java.lang.StackOverflowError
Run Code Online (Sandbox Code Playgroud)
我在下面进一步查看并找到以下几行:
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_231]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.2.1.RELEASE.jar:2.2.1.RELEASE]
Caused by: java.lang.StackOverflowError: null
at de.codecentric.boot.admin.server.web.servlet.AdminControllerHandlerMapping.withPrefix(AdminControllerHandlerMapping.java:48) ~[spring-boot-admin-server-2.1.0.jar:2.1.0]
at de.codecentric.boot.admin.server.web.servlet.AdminControllerHandlerMapping.registerHandlerMethod(AdminControllerHandlerMapping.java:44) ~[spring-boot-admin-server-2.1.0.jar:2.1.0]
Run Code Online (Sandbox Code Playgroud)
不确定 jars 中是否存在一些循环依赖。请问有什么想法吗?
问题
显示内部 IP 的 Spring Boot 管理应用程序列表页面
应用程序详细信息页面几乎为零信息
细节
关于如何处理这种情况有任何提示吗?还有其他选择吗?
我还想知道如果 Pod 具有多个副本,Spring Boot 管理员会如何表现。我认为通过入口或节点端口指向唯一的 Pod 副本几乎是不可能的。
我正在研究的黑客
如果我可以启动另一个 pod,将 Linux 桌面公开给最终用户。从该桌面的浏览器中,用户可以访问 pod 网络 ip。作为黑客,这只是一个疯狂的想法。
spring-boot kubernetes microservices spring-cloud spring-boot-admin
我有一个由 Keycloak 保护的 Spring Boot 管理应用程序,我定义了一个具有领域角色的用户ACTUATOR。问题是身份验证后 Spring Security 无权访问领域角色。我可以看到授予的权限:Granted Authorities: ROLE_USER, SCOPE_actuator_access, SCOPE_profile'
查看文档,我发现这一部分:基于委派的策略与 OAuth2UserService这是我的配置:
这是我的配置:
@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure( HttpSecurity http ) throws Exception {
http.csrf().disable().cors().disable();
http.authorizeRequests()
.antMatchers( "/error","/instances", "/**/*.css", "/**/img/**", "/**/third-party/**", "/*.js" )
.permitAll()
.anyRequest().hasRole( "ACTUATOR" )
.and()
.oauth2Login( oauth2 -> oauth2.userInfoEndpoint(
userInfo -> userInfo.oidcUserService( this.oidcUserService() ) ) );
}
// I just copy-paste the doc's code to play with it...
private OAuth2UserService<OidcUserRequest, OidcUser> oidcUserService() { …Run Code Online (Sandbox Code Playgroud) spring-security spring-boot spring-security-oauth2 keycloak spring-boot-admin
将我们的堆栈迁移到 Spring Boot 2.0.3 并切换我们的 Spring Boot 管理。一切正常,微服务正在注册(向代码中心致敬)
唯一的问题是,当服务关闭或启动时,我们没有收到任何松弛通知,这与早期版本(工作正常)不同,我们使用与以前相同的配置:
spring.boot.admin.notify.slack.enabled=true
spring.boot.admin.notify.slack.username=Spring Boot Admin Service
spring.boot.admin.notify.slack.message=*#{application.name}* (#
{application.id}) is *#{to.status}*
spring.boot.admin.notify.slack.icon=:bender:
Run Code Online (Sandbox Code Playgroud)
以及 yaml 文件中的 Web hook url
spring:
profiles: production
boot:
admin:
notify:
slack:
webhook-url: xxx
Run Code Online (Sandbox Code Playgroud)
任何帮助表示赞赏
我有一个运行良好的 Spring Boot 管理服务器。以下是文件:
pom.xml
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-boot-admin.version>2.1.0</spring-boot-admin.version>
</properties>
<dependencies>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-ui</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>
Run Code Online (Sandbox Code Playgroud)
application.properties
server.port = 9090
spring.application.name = adminserver
Run Code Online (Sandbox Code Playgroud)
DemoApplication.java
@SpringBootApplication
@EnableAdminServer
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
Run Code Online (Sandbox Code Playgroud)
这很好用。我可以导航到http://localhost:9090/#/applications并查看管理服务器就好了。

问题是当我尝试将我的客户端应用程序之一注册到服务器时。以下是我的客户端应用程序的详细信息:
pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.0.RC1</version>
<relativePath/>
</parent> …Run Code Online (Sandbox Code Playgroud) 我正在按照http://codecentric.github.io/spring-boot-admin/2.1.1/#customizing-custom-views-instance中的文档向Spring Boot管理服务器添加自定义选项卡
但是文档和示例项目https://github.com/codecentric/spring-boot-admin/tree/2.1.1/spring-boot-admin-samples/spring-boot-admin-sample-custom-ui并没有似乎有助于了解如何进行。
通过阅读文档和示例,我的理解是ui是一个单独的模块。
我似乎缺少的部分是如何将它们捆绑到ui模块和spring boot管理服务器中并提供它们。
到目前为止,这是我尝试过的:https : //github.com/anandsunderraman/custom-spring-boot-admin/tree/master