2024-07-11
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
How to configure the path in the browser to achieve personalized access path to index.html under the resource path
To configure a specific prefix to access static resources in a Spring Boot project, you canapplication.yml
Configure the path mapping in the file. The following is an example configuration:
Open yourapplication.yml
Files, usually insrc/main/resources
Under contents.
Add the following configuration:
spring:
mvc:
static-path-pattern: /your-prefix/**
resources:
static-locations: classpath:/static/