There was an unexpected error (type=Not Found, status=404). No message
available
Today, I encountered a very wordless bug. When I visited it, I found that this path did not find the file. The main reason is that springboot uses the template with HTML suffix by default instead of JSP. Therefore, after adding the dependency package and startup mode, I need to add these two sentences to the configuration file.
spring.mvc.view.prefix=/
spring.mvc.view.suffix=.jsp
When suffix suffix is added, the file can be found according to the path, but this error will occur
There was an unexpected error (type=Not Found, status=404). / #
ǰ׺��j��jsp/user- list.jsp
Then add the prefix and suffix together and you can access them.
But the most pit is coming!!!
Yesterday, I configured the integrated JSP mode, and it can be accessed normally. Today, I opened the computer access program, but it didn’t work. I’ve been looking at it. It should be the problem of path. Then I looked at the path of the controller, the name of the template, and the configuration file,
spring.mvc.view .prefix=/
spring.mvc.view .suffix=.jsp
After looking for it for a long time, I didn’t believe it. I first repeated the suffix, received it, didn’t copy it, and then restarted the scope of the project. The error report became a garbled error report. Then I changed the prefix and restarted the access. It was OK. I felt that the most pitiful thing was this. I found the bug for more than an hour, just because springboot couldn’t reload the configuration that had been written File?? It’s strange, but it’s always done. I’ll find out the reason later.
Read More:
- There was an unexpected error (type=Internal Server Error, status=500).Invalid bound statement (not
- Maven project running servlet jump JSP error: HTTP status 500 – unable to compile class for JSP
- [Solved] java.io.IOException: Got error, status=ERROR, status message, ack with firstBadLink as
- [Solved] Springboot error: Could Not Found xxmapper
- [Solved] Springboot Project Start Error: An attempt was made to call the method com.google.common.collect.Multimaps.asMap
- [Solved] SpringBoot Error: Property ‘mapperLocations‘ was not specified.
- Java Error: No enclosing instance of type Main is accessible. Must qualify the allocation with an encl
- Springboot mybatis Integrate Error: Invalid bound statement (not found): com…DepartmentMapper.save
- [Solved] SpringBoot Project Startup Error: Field userMapper in com.demo.controller.MemberController required a bean of type ‘c
- [Solved] No validator could be found for constraint ‘javax.validation.constraints.NotBlank’ validating type ‘java.lang.String’
- [Solved] SpringBoot Microservices: Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded dat
- [Solved] POI Read excel Error: Your InputStream was neither an OLE2 stream, nor an OOXML stream
- [Solved] Could not find resource COM / atguigu / Dao / studentdao.xm, the mapper file for storing SQL statements could not be found and an error occurred
- [Solved] Springboot Package jar and Startup Error: It was loaded from the following location
- [Solved] SpringBoot Error: This application has no explicit mapping for /error,so you are seeing this as a fallback
- [Solved] SpringBoot Startup Error: Description:Web server failed to start. Port 9090 was already in use.(win10)
- [Solved] SpringBoot Date Convert Error: JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime`
- Run hadoop fs -put Command Error: java.io.IOException: Got error, status message , ack with firstBadLink
- After asynchronous file import and springboot multipartfile upload, the @async asynchronous processing reports an error: nosuchfileexception
- [Solved] Java.lang.IllegalStateException: Type handler was null on parameter mapping for property ‘__frch_it