Skip to content

Fix Webjars Bootstrap Resource Not Found Error-created-by-agentic #441

@doppleware

Description

@doppleware

Issue Description

The application is experiencing a "Webjars Bootstrap Resource Not Found Error" when trying to access Bootstrap resources through the webjar path.

Root Cause

  1. Missing proper Webjars resource configuration in Spring Boot
  2. CSS profile not activated during build process

Solution

  1. Added proper Webjars configuration in application.properties:

    spring.mvc.static-path-pattern=/webjars/**
    spring.web.resources.static-locations=classpath:/META-INF/resources/webjars/
    spring.web.resources.chain.strategy.content.enabled=true
    spring.web.resources.chain.strategy.content.paths=/webjars/**
  2. CSS profile must be activated during build:

    ./mvnw clean package -P css

Related PR

See PR #440 for the implementation.

Validation Steps

  1. Build with CSS profile: ./mvnw clean package -P css
  2. Verify contents of target/webjars directory
  3. Start application and verify Bootstrap resources are accessible through webjar paths

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions