This error did not appear when I was running in idea, but it appeared after I typed the project into a jar package and executed the jar package. This error means that the template page cannot be found, but the template page actually exists in my project. The solution to this error is to skip the template page in the controller without starting with “/”.
Example
@Controller
public class userController {
@Autowired
private userServiceImpl userService;
@RequestMapping("/userInfo/{nickname}")
public Object showBlog(@PathVariable("nickname") String nickname,
Model model, HttpServletRequest request){
User userInfo = userService.getUserInfo(nickname);
model.addAttribute("userInfo",userInfo);
return "userInfo";
}
}
Read More:
- [Solved] “status“:405,“error“ Request method ‘POST‘ not supported“
- [Solved] JSON parse error: Cannot deserialize instance of `java.util.ArrayList<..> out of START_OBJECT token;
- [Solved] Circular view path [index]: would dispatch back to the current handler URL [] again. Che
- [Solved] Java.lang.IllegalStateException: getReader() has already been called for this request
- Using Post no Body Error: socket hang up [How to Solve]
- How to Solve Tomcat Error: Could not resolve view with name ‘xxx/xxxxxxx‘ in servlet with
- [Solved] java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed
- [Solved] SpringBoot Error: This application has no explicit mapping for /error,so you are seeing this as a fallback
- [Solved] Consider defining a bean of type ‘org.springframework.data.redis.core.RedisTemplate‘ in your configu
- [How to Solve] error at ::0 formal unbound in pointcut
- How to Solve the Primary Key of mybatisPlus Inserted Data is too Large Issue
- Defining a bean of type ‘org.springframework.data.redis.core.RedisTemplate‘ in your configuration.
- [Solved] org.thymeleaf.exceptions.TemplateInputException: Error resolving template
- [Solved] Failed to convert value of type ‘java.lang.String‘ to required type ‘java.util.Date‘;
- [Solved] Error resolving template template might not exist or might not be accessible
- Xdoc generates API documents based on Java annotations
- List: How to de-duplication according to an attribute of an object
- Springboot thymeleaf Error: Exception processing template “table/dynamic_table”: Error resolving template [common]…
- [PROJECT] itdage java to get the weather and send text messages
- Asynchronous processing of HTTP request by Java_ Method 2: through deferredresult