Skip to content

The spring boot admin (3.4.4, 3.4.5) server does not support the settings of [server. server. context path], [spring. mvc. server. path], and [spring. boot. admin. context path] #4218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Anvice opened this issue Apr 24, 2025 · 5 comments

Comments

@Anvice
Copy link

Anvice commented Apr 24, 2025

Spring Boot Admin Server information

  • Version:
    3.4.5

  • Spring Boot version:
    3.4.4

  • Configured Security:
    basic auth

  • Webflux or Servlet application:
    servlet(spring boot web)

Client information

  • Spring Boot versions:
    3.4.4

  • Used discovery mechanism:
    self

  • Webflux or Servlet application:
    servlet(spring boot web)

Description

@Anvice
Copy link
Author

Anvice commented Apr 24, 2025

Server related settings

server:
port: 8080
compression:
enabled: true
mime-types: application/json
session:
timeout: 36000
servlet:
encoding:
force: true
charset: UTF-8
context-path: /project
spring:
application:
name: template-monitor-server
mvc:
servlet:
path: /mvcc

spring boot admin server settings

spring:
boot:
admin:
monitor:
status-interval: 5000
status-lifetime: 5000
info-interval: 1m
info-lifetime: 1m
default-timeout: 20000
timeout:
read: 5000
connect: 2000
default-retries: 2
retries:
max-attempts: 3
initial-interval: 1000
max-interval: 5000
multiplier: 2
ui:
title: Spring Boot Admin Monitor
brand: MySelf
login-icon: assets/img/icon-spring-boot-admin.svg
favicon: assets/img/faviconpng
favicon-danger: assets/img/favicon-danger.png
remember-me-enabled: true
poll-timer:
cache: 2500
datasource: 2500
gc: 2500
process: 2500
memory: 2500
threads: 2500
discovery:
ignored-services: "*"
notify:
mail:
enabled: false
turbine:
clusters: default
location: turbine-service
security:
user:
name: admin
password: admin
probed-endpoints: health,info,metrics,env,loggers,logfile,refresh,flyway,liquibase,heapdump,auditevents,jolokia,httptrace,httptrace:trace,threaddump:dump
instance-auth:
instance-proxy:
ignored-headers: "Cookie,Set-Cookie,Authorization"
enabled: true
default-user-name: admin
default-user-password: admin
service-map:
template-monitor-client:
user-name: admin
user-password: admin
template-monitor-client1:
user-name: admin
user-password: admin
template-monitor-client2:
user-name: admin
user-password: admin
security:
user:
name: admin
password: admin

management:
endpoints:
web:
#base-path: /actuator
exposure:
include: '*'
endpoint:
health:
show-details: always
logfile:
external-file: ./logs/client-info.log
info:
git:
mode: full
trace:
http:
enabled: true
include:
- request-headers
- response-headers
- cookies
- principal
- remote-address
- session-id
- time-taken

@Anvice
Copy link
Author

Anvice commented Apr 24, 2025

I'm studying Spring Boot Admin, and according to my study habits, I will try my best to configure all available configurations and label the purpose of the configurations. Therefore, there will be many default contents in the above configurations. Please forgive me

@Anvice
Copy link
Author

Anvice commented Apr 24, 2025

In the springboot project, when configuring any one, two, or three of [server. server. context path], [spring. mvc. server. path], and [spring. boot. admin. context path], after docking with Spring Boot Admin, The URL for the Spring Boot Admin console is【 http://IP: ${server. port} ${server. rvlet. context path} ${spring. mvc. servlet. path} ${spring. boot. admin. context path}], but when refreshing the application registration list, the browser checks the console and the requested URL is [http://IP: ${server. port}/applications], which is not concatenated with [${server. port} ${server. rvlet. context path} ${spring. mvc. servlet. path}]

@erikpetzold
Copy link
Member

Hi @Lucifer-Z,
can you please tell what you want to achieve?

You want the Admin server to run with a context path? Or the monitored instance? Is the context path defined outide of your application or do you want to define it within the application?

Also your formatting is very hard to read. Please use the code feature for property name, do not include whitespace in the names, try not to confuse server and servlet and so on.

For the client instance, there are some samples here: https://github.com/erikpetzold/sba-client-demo-apps (but not covering context paths for the server)

There is also a sample for running behind a proxy with different context paths here: https://github.com/codecentric/spring-boot-admin-runtime-playground/tree/main/nginx

@Anvice
Copy link
Author

Anvice commented May 7, 2025

Hi, @erikpetzold

The above solution relies on nginx's reverse proxy,Can solve my needs.

Although,I originally hoped to rely solely on the configuration of SpringBootAdmin to meet the needs of using the context path

@Anvice Anvice closed this as completed May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants