Shehan Simen
Shehan Simen

Reputation: 1306

Springboot admin 3.x.x doesn't load the page

I am using Spring Boot 3.0.1 with Java 17. For spring boot admin and client, I am using the latest version as follows.

        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-starter-client</artifactId>
            <version>3.0.0-M8</version>
        </dependency>
        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-server-ui</artifactId>
            <version>3.0.0-M8</version>
        </dependency>

After the login screen to admin, I get the following. Nothing rendered on the page.

:root {
  --main-50: 238, 252, 250;
  --main-100: 217, 247, 244;
  --main-200: 183, 240, 234;
  --main-300: 145, 232, 224;
  --main-400: 107, 224, 213;
  --main-500: 71, 217, 203;
  --main-600: 39, 190, 175;
  --main-700: 30, 144, 132;
  --main-800: 20, 97, 90;
  --main-900: 10, 47, 43;

  --bg-color-start: #91E8E0;
  --bg-color-stop: #1E9084;
}

.bg-color-start {
  transition: 0.4s ease;
  stop-color: var(--bg-color-start);
}

.bg-color-stop {
  transition: 0.4s ease;
  stop-color: var(--bg-color-stop);
}

What am I missing? Is the latest version unstable still?

Upvotes: 1

Views: 745

Answers (1)

Erik P
Erik P

Reputation: 420

I think this is the same question like here: https://github.com/codecentric/spring-boot-admin/issues/2218

The css file is used by the login page, but needs authenticated access. So it is loaded after login and then displayed.

Solution is to permit access to the variables.css file like

.requestMatchers(new AntPathRequestMatcher(this.adminServer.path("/variables.css"))).permitAll()

in the spring security config, similar to the static assets.

The SBA Team will check if this is really required or if it can be changed in SBA before final release of 3.0. If it will be needed we'll update the docs.

Upvotes: 1

Related Questions