Java Spring Boot mapping for static data not valid
So I am just goofing around with webpages and found this cool collection of free designs here
https://github.com/puikinsh/CoolAdmin
I added all of the static resources (css/fonts/imgs/js/vendor) to my own personal project to try to rip some stuff to mess around with forms and what not!
I made a simple Index page in attempt to completely copy the index page just to make sure everything was working, and I got an unexpected result.
I have Spring Boot/Default settings should make my static via /resources/**
2018-12-28 05:59:07.422 WARN 16540 --- [nio-8080-exec-2]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js
2018-12-28 05:59:07.422 WARN 16540 --- [nio-8080-exec-1]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/wow/wow.min.js
2018-12-28 05:59:07.422 WARN 16540 --- [io-8080-exec-10]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/animsition/animsition.min.js
2018-12-28 05:59:07.423 WARN 16540 --- [nio-8080-exec-9]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/counter-up/jquery.counterup.min.js
2018-12-28 05:59:07.423 WARN 16540 --- [nio-8080-exec-8]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/counter-up/jquery.waypoints.min.js
I get this for all of the static/** files that are embedded in my HTML like so:
<link href="../static/css/font-face.css" rel="stylesheet" media="all">
The only java files I have thus far is the TestController and the SpringBootApp.
@RequestMapping({"", "index"})
public String getIndex() {
return "index3";
}
The web page shows the HTML but no CSS/JS/ect.
All help is appreciated!
java
add a comment |
So I am just goofing around with webpages and found this cool collection of free designs here
https://github.com/puikinsh/CoolAdmin
I added all of the static resources (css/fonts/imgs/js/vendor) to my own personal project to try to rip some stuff to mess around with forms and what not!
I made a simple Index page in attempt to completely copy the index page just to make sure everything was working, and I got an unexpected result.
I have Spring Boot/Default settings should make my static via /resources/**
2018-12-28 05:59:07.422 WARN 16540 --- [nio-8080-exec-2]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js
2018-12-28 05:59:07.422 WARN 16540 --- [nio-8080-exec-1]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/wow/wow.min.js
2018-12-28 05:59:07.422 WARN 16540 --- [io-8080-exec-10]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/animsition/animsition.min.js
2018-12-28 05:59:07.423 WARN 16540 --- [nio-8080-exec-9]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/counter-up/jquery.counterup.min.js
2018-12-28 05:59:07.423 WARN 16540 --- [nio-8080-exec-8]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/counter-up/jquery.waypoints.min.js
I get this for all of the static/** files that are embedded in my HTML like so:
<link href="../static/css/font-face.css" rel="stylesheet" media="all">
The only java files I have thus far is the TestController and the SpringBootApp.
@RequestMapping({"", "index"})
public String getIndex() {
return "index3";
}
The web page shows the HTML but no CSS/JS/ect.
All help is appreciated!
java
Where have you stored the files in your projects precisely (post the exact and complete path of font-face.css), and what is the URL of the page you're looking at in your browser (post the complete URL of the location bar of your browser).
– JB Nizet
Dec 28 '18 at 11:12
<link href="/css/font-face.css" rel="stylesheet" media="all"> Gives me - No mapping for GET /css/font-face.css is the result I get, same with the rest for their respected directory
– Eggspurt
Dec 28 '18 at 11:12
You're not answering my questions.
– JB Nizet
Dec 28 '18 at 11:13
You adjusted your comment - I updated my OP with my information The url I am going to is localhost:8080
– Eggspurt
Dec 28 '18 at 11:15
So you're at the root. There is nothing above the root. So the path../static
doesn't make sense. What is under static is served at the root by Spring boot. So havingstatic
in the path doesn't make sense either. All you need ishref="css/font-face.css"
(relative URL) orhref="/css/font-face.css"
(absolute URL). If that doesn't work, it means that you're not using a standard spring boot configuration.
– JB Nizet
Dec 28 '18 at 11:18
add a comment |
So I am just goofing around with webpages and found this cool collection of free designs here
https://github.com/puikinsh/CoolAdmin
I added all of the static resources (css/fonts/imgs/js/vendor) to my own personal project to try to rip some stuff to mess around with forms and what not!
I made a simple Index page in attempt to completely copy the index page just to make sure everything was working, and I got an unexpected result.
I have Spring Boot/Default settings should make my static via /resources/**
2018-12-28 05:59:07.422 WARN 16540 --- [nio-8080-exec-2]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js
2018-12-28 05:59:07.422 WARN 16540 --- [nio-8080-exec-1]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/wow/wow.min.js
2018-12-28 05:59:07.422 WARN 16540 --- [io-8080-exec-10]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/animsition/animsition.min.js
2018-12-28 05:59:07.423 WARN 16540 --- [nio-8080-exec-9]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/counter-up/jquery.counterup.min.js
2018-12-28 05:59:07.423 WARN 16540 --- [nio-8080-exec-8]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/counter-up/jquery.waypoints.min.js
I get this for all of the static/** files that are embedded in my HTML like so:
<link href="../static/css/font-face.css" rel="stylesheet" media="all">
The only java files I have thus far is the TestController and the SpringBootApp.
@RequestMapping({"", "index"})
public String getIndex() {
return "index3";
}
The web page shows the HTML but no CSS/JS/ect.
All help is appreciated!
java
So I am just goofing around with webpages and found this cool collection of free designs here
https://github.com/puikinsh/CoolAdmin
I added all of the static resources (css/fonts/imgs/js/vendor) to my own personal project to try to rip some stuff to mess around with forms and what not!
I made a simple Index page in attempt to completely copy the index page just to make sure everything was working, and I got an unexpected result.
I have Spring Boot/Default settings should make my static via /resources/**
2018-12-28 05:59:07.422 WARN 16540 --- [nio-8080-exec-2]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js
2018-12-28 05:59:07.422 WARN 16540 --- [nio-8080-exec-1]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/wow/wow.min.js
2018-12-28 05:59:07.422 WARN 16540 --- [io-8080-exec-10]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/animsition/animsition.min.js
2018-12-28 05:59:07.423 WARN 16540 --- [nio-8080-exec-9]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/counter-up/jquery.counterup.min.js
2018-12-28 05:59:07.423 WARN 16540 --- [nio-8080-exec-8]
o.s.web.servlet.PageNotFound : No mapping for GET
/static/vendor/counter-up/jquery.waypoints.min.js
I get this for all of the static/** files that are embedded in my HTML like so:
<link href="../static/css/font-face.css" rel="stylesheet" media="all">
The only java files I have thus far is the TestController and the SpringBootApp.
@RequestMapping({"", "index"})
public String getIndex() {
return "index3";
}
The web page shows the HTML but no CSS/JS/ect.
All help is appreciated!
java
java
edited Dec 28 '18 at 11:16
Eggspurt
asked Dec 28 '18 at 11:06
EggspurtEggspurt
359
359
Where have you stored the files in your projects precisely (post the exact and complete path of font-face.css), and what is the URL of the page you're looking at in your browser (post the complete URL of the location bar of your browser).
– JB Nizet
Dec 28 '18 at 11:12
<link href="/css/font-face.css" rel="stylesheet" media="all"> Gives me - No mapping for GET /css/font-face.css is the result I get, same with the rest for their respected directory
– Eggspurt
Dec 28 '18 at 11:12
You're not answering my questions.
– JB Nizet
Dec 28 '18 at 11:13
You adjusted your comment - I updated my OP with my information The url I am going to is localhost:8080
– Eggspurt
Dec 28 '18 at 11:15
So you're at the root. There is nothing above the root. So the path../static
doesn't make sense. What is under static is served at the root by Spring boot. So havingstatic
in the path doesn't make sense either. All you need ishref="css/font-face.css"
(relative URL) orhref="/css/font-face.css"
(absolute URL). If that doesn't work, it means that you're not using a standard spring boot configuration.
– JB Nizet
Dec 28 '18 at 11:18
add a comment |
Where have you stored the files in your projects precisely (post the exact and complete path of font-face.css), and what is the URL of the page you're looking at in your browser (post the complete URL of the location bar of your browser).
– JB Nizet
Dec 28 '18 at 11:12
<link href="/css/font-face.css" rel="stylesheet" media="all"> Gives me - No mapping for GET /css/font-face.css is the result I get, same with the rest for their respected directory
– Eggspurt
Dec 28 '18 at 11:12
You're not answering my questions.
– JB Nizet
Dec 28 '18 at 11:13
You adjusted your comment - I updated my OP with my information The url I am going to is localhost:8080
– Eggspurt
Dec 28 '18 at 11:15
So you're at the root. There is nothing above the root. So the path../static
doesn't make sense. What is under static is served at the root by Spring boot. So havingstatic
in the path doesn't make sense either. All you need ishref="css/font-face.css"
(relative URL) orhref="/css/font-face.css"
(absolute URL). If that doesn't work, it means that you're not using a standard spring boot configuration.
– JB Nizet
Dec 28 '18 at 11:18
Where have you stored the files in your projects precisely (post the exact and complete path of font-face.css), and what is the URL of the page you're looking at in your browser (post the complete URL of the location bar of your browser).
– JB Nizet
Dec 28 '18 at 11:12
Where have you stored the files in your projects precisely (post the exact and complete path of font-face.css), and what is the URL of the page you're looking at in your browser (post the complete URL of the location bar of your browser).
– JB Nizet
Dec 28 '18 at 11:12
<link href="/css/font-face.css" rel="stylesheet" media="all"> Gives me - No mapping for GET /css/font-face.css is the result I get, same with the rest for their respected directory
– Eggspurt
Dec 28 '18 at 11:12
<link href="/css/font-face.css" rel="stylesheet" media="all"> Gives me - No mapping for GET /css/font-face.css is the result I get, same with the rest for their respected directory
– Eggspurt
Dec 28 '18 at 11:12
You're not answering my questions.
– JB Nizet
Dec 28 '18 at 11:13
You're not answering my questions.
– JB Nizet
Dec 28 '18 at 11:13
You adjusted your comment - I updated my OP with my information The url I am going to is localhost:8080
– Eggspurt
Dec 28 '18 at 11:15
You adjusted your comment - I updated my OP with my information The url I am going to is localhost:8080
– Eggspurt
Dec 28 '18 at 11:15
So you're at the root. There is nothing above the root. So the path
../static
doesn't make sense. What is under static is served at the root by Spring boot. So having static
in the path doesn't make sense either. All you need is href="css/font-face.css"
(relative URL) or href="/css/font-face.css"
(absolute URL). If that doesn't work, it means that you're not using a standard spring boot configuration.– JB Nizet
Dec 28 '18 at 11:18
So you're at the root. There is nothing above the root. So the path
../static
doesn't make sense. What is under static is served at the root by Spring boot. So having static
in the path doesn't make sense either. All you need is href="css/font-face.css"
(relative URL) or href="/css/font-face.css"
(absolute URL). If that doesn't work, it means that you're not using a standard spring boot configuration.– JB Nizet
Dec 28 '18 at 11:18
add a comment |
1 Answer
1
active
oldest
votes
I was facing the same issues and solved it the following way:
Make sure the folder you are exporting is available to the web
public class WebMvcConfig extends WebMvcConfigurerAdapter {
private static final String CLASSPATH_RESOURCE_LOCATIONS = {
"classpath:/META-INF/resources/", "classpath:/resources/",
"classpath:/static/", "classpath:/public/"
};
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**")
.addResourceLocations(CLASSPATH_RESOURCE_LOCATIONS);
}
}
In addition you must put your css or styles folder into your src/main/resources/(static|public|resources|META-INF/resources) folder
Make sure your security policies don't block them
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
public void configure(WebSecurity web) throws Exception {
//Web resources
web.ignoring().antMatchers("/css/**");
web.ignoring().antMatchers("/scripts/**");
web.ignoring().antMatchers("/images/**");
}
}
Thanks for this- Any idea why the default spring boot doesn't do this for us?
– Eggspurt
Dec 28 '18 at 11:21
It does. I just tested it: 1. create a new project with spring-initializr, selecting just "web" as a dependency. 2. Put all the files of CoolAdmin, as is, under src/main/resources/static; 3. start the app. 4. go to localhost:8080. The dashboard is correctly displayed.
– JB Nizet
Dec 28 '18 at 11:27
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53957530%2fjava-spring-boot-mapping-for-static-data-not-valid%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I was facing the same issues and solved it the following way:
Make sure the folder you are exporting is available to the web
public class WebMvcConfig extends WebMvcConfigurerAdapter {
private static final String CLASSPATH_RESOURCE_LOCATIONS = {
"classpath:/META-INF/resources/", "classpath:/resources/",
"classpath:/static/", "classpath:/public/"
};
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**")
.addResourceLocations(CLASSPATH_RESOURCE_LOCATIONS);
}
}
In addition you must put your css or styles folder into your src/main/resources/(static|public|resources|META-INF/resources) folder
Make sure your security policies don't block them
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
public void configure(WebSecurity web) throws Exception {
//Web resources
web.ignoring().antMatchers("/css/**");
web.ignoring().antMatchers("/scripts/**");
web.ignoring().antMatchers("/images/**");
}
}
Thanks for this- Any idea why the default spring boot doesn't do this for us?
– Eggspurt
Dec 28 '18 at 11:21
It does. I just tested it: 1. create a new project with spring-initializr, selecting just "web" as a dependency. 2. Put all the files of CoolAdmin, as is, under src/main/resources/static; 3. start the app. 4. go to localhost:8080. The dashboard is correctly displayed.
– JB Nizet
Dec 28 '18 at 11:27
add a comment |
I was facing the same issues and solved it the following way:
Make sure the folder you are exporting is available to the web
public class WebMvcConfig extends WebMvcConfigurerAdapter {
private static final String CLASSPATH_RESOURCE_LOCATIONS = {
"classpath:/META-INF/resources/", "classpath:/resources/",
"classpath:/static/", "classpath:/public/"
};
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**")
.addResourceLocations(CLASSPATH_RESOURCE_LOCATIONS);
}
}
In addition you must put your css or styles folder into your src/main/resources/(static|public|resources|META-INF/resources) folder
Make sure your security policies don't block them
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
public void configure(WebSecurity web) throws Exception {
//Web resources
web.ignoring().antMatchers("/css/**");
web.ignoring().antMatchers("/scripts/**");
web.ignoring().antMatchers("/images/**");
}
}
Thanks for this- Any idea why the default spring boot doesn't do this for us?
– Eggspurt
Dec 28 '18 at 11:21
It does. I just tested it: 1. create a new project with spring-initializr, selecting just "web" as a dependency. 2. Put all the files of CoolAdmin, as is, under src/main/resources/static; 3. start the app. 4. go to localhost:8080. The dashboard is correctly displayed.
– JB Nizet
Dec 28 '18 at 11:27
add a comment |
I was facing the same issues and solved it the following way:
Make sure the folder you are exporting is available to the web
public class WebMvcConfig extends WebMvcConfigurerAdapter {
private static final String CLASSPATH_RESOURCE_LOCATIONS = {
"classpath:/META-INF/resources/", "classpath:/resources/",
"classpath:/static/", "classpath:/public/"
};
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**")
.addResourceLocations(CLASSPATH_RESOURCE_LOCATIONS);
}
}
In addition you must put your css or styles folder into your src/main/resources/(static|public|resources|META-INF/resources) folder
Make sure your security policies don't block them
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
public void configure(WebSecurity web) throws Exception {
//Web resources
web.ignoring().antMatchers("/css/**");
web.ignoring().antMatchers("/scripts/**");
web.ignoring().antMatchers("/images/**");
}
}
I was facing the same issues and solved it the following way:
Make sure the folder you are exporting is available to the web
public class WebMvcConfig extends WebMvcConfigurerAdapter {
private static final String CLASSPATH_RESOURCE_LOCATIONS = {
"classpath:/META-INF/resources/", "classpath:/resources/",
"classpath:/static/", "classpath:/public/"
};
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**")
.addResourceLocations(CLASSPATH_RESOURCE_LOCATIONS);
}
}
In addition you must put your css or styles folder into your src/main/resources/(static|public|resources|META-INF/resources) folder
Make sure your security policies don't block them
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
public void configure(WebSecurity web) throws Exception {
//Web resources
web.ignoring().antMatchers("/css/**");
web.ignoring().antMatchers("/scripts/**");
web.ignoring().antMatchers("/images/**");
}
}
answered Dec 28 '18 at 11:16
Sagar P. GhagareSagar P. Ghagare
428314
428314
Thanks for this- Any idea why the default spring boot doesn't do this for us?
– Eggspurt
Dec 28 '18 at 11:21
It does. I just tested it: 1. create a new project with spring-initializr, selecting just "web" as a dependency. 2. Put all the files of CoolAdmin, as is, under src/main/resources/static; 3. start the app. 4. go to localhost:8080. The dashboard is correctly displayed.
– JB Nizet
Dec 28 '18 at 11:27
add a comment |
Thanks for this- Any idea why the default spring boot doesn't do this for us?
– Eggspurt
Dec 28 '18 at 11:21
It does. I just tested it: 1. create a new project with spring-initializr, selecting just "web" as a dependency. 2. Put all the files of CoolAdmin, as is, under src/main/resources/static; 3. start the app. 4. go to localhost:8080. The dashboard is correctly displayed.
– JB Nizet
Dec 28 '18 at 11:27
Thanks for this- Any idea why the default spring boot doesn't do this for us?
– Eggspurt
Dec 28 '18 at 11:21
Thanks for this- Any idea why the default spring boot doesn't do this for us?
– Eggspurt
Dec 28 '18 at 11:21
It does. I just tested it: 1. create a new project with spring-initializr, selecting just "web" as a dependency. 2. Put all the files of CoolAdmin, as is, under src/main/resources/static; 3. start the app. 4. go to localhost:8080. The dashboard is correctly displayed.
– JB Nizet
Dec 28 '18 at 11:27
It does. I just tested it: 1. create a new project with spring-initializr, selecting just "web" as a dependency. 2. Put all the files of CoolAdmin, as is, under src/main/resources/static; 3. start the app. 4. go to localhost:8080. The dashboard is correctly displayed.
– JB Nizet
Dec 28 '18 at 11:27
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53957530%2fjava-spring-boot-mapping-for-static-data-not-valid%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Where have you stored the files in your projects precisely (post the exact and complete path of font-face.css), and what is the URL of the page you're looking at in your browser (post the complete URL of the location bar of your browser).
– JB Nizet
Dec 28 '18 at 11:12
<link href="/css/font-face.css" rel="stylesheet" media="all"> Gives me - No mapping for GET /css/font-face.css is the result I get, same with the rest for their respected directory
– Eggspurt
Dec 28 '18 at 11:12
You're not answering my questions.
– JB Nizet
Dec 28 '18 at 11:13
You adjusted your comment - I updated my OP with my information The url I am going to is localhost:8080
– Eggspurt
Dec 28 '18 at 11:15
So you're at the root. There is nothing above the root. So the path
../static
doesn't make sense. What is under static is served at the root by Spring boot. So havingstatic
in the path doesn't make sense either. All you need ishref="css/font-face.css"
(relative URL) orhref="/css/font-face.css"
(absolute URL). If that doesn't work, it means that you're not using a standard spring boot configuration.– JB Nizet
Dec 28 '18 at 11:18