springboot themaleaf 各种报错
1.访问themaleaf页面报错
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback. Mon Jun :: CST
There was an unexpected error (type=Not Found, status=).
No message available
错误1:
调试时加入了WebMvcConfig类
package com.feilong.Reptile.config; import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /**
* 配置静态资源映射
*
* @author sunziwen
* @version 1.0
* @date 2018-11-16 14:57
**/
@Component
public class WebMvcConfig implements WebMvcConfigurer {
/**
* 添加静态资源文件,外部可以直接访问地址
*
* @param registry
*/
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
}
}
删除这个类后还是报错,猜测可能是包路径问题,重新建立个新项目,将旧项目转移后,没有再报错。
springboot themaleaf 各种报错的更多相关文章
- Springboot数据库连接池报错的解决办法
Springboot数据库连接池报错的解决办法 这个异常通常在Linux服务器上会发生,原因是Linux系统会主动断开一个长时间没有通信的连接 那么我们的问题就是:数据库连接池长时间处于间歇状态,导致 ...
- Springboot 启动文件报错,原因是@ComponentScan写成了@ComponentScans
Springboot 启动文件报错,原因是@ComponentScan写成了@ComponentScans
- springboot测试启动报错java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
springboot测试启动报错: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you ne ...
- springboot项目启动报错Failed to configure a DataSource: 'url' attribute is not specified and no embedde
springboot项目启动报错Failed to configure a DataSource: 'url' attribute is not specified and no embedde 创建 ...
- Springboot整合Elasticsearch报错availableProcessors is already set to [4], rejecting [4]
Springboot整合Elasticsearch报错 今天使用SpringBoot整合Elasticsearch时候,相关的配置完成后,启动项目就报错了. nested exception is j ...
- SpringBoot集成MybatisPlus报错
SpringBoot集成MybatisPlus报错 启动的时候总是报如下错误: java.lang.annotation.AnnotationFormatError: Invalid default: ...
- Springboot 之 启动报错-Cannot determine embedded database driver class for database type NONE
Springboot 之 启动报错-数据库 springboot项目在启动时,报如下错误: Error starting ApplicationContext. To display the auto ...
- Springboot项目启动报错,提示Cannot determine embedded database driver class for database type NONE
我在springboot项目里面引入了数据库的配置: <dependency> <groupId>org.mybatis.spring.boot</groupId> ...
- springboot 日期转化报错
问题场景: 使用Springboot框架搭建服务,传日期参数json参数为2016-08-15 17:00:00这种格式,springboot中不能识别,将其转化为对象对应的日期属性.而是抛出异常信息 ...
随机推荐
- [AtCoder] NIKKEI Programming Contest 2019 (暂缺F)
[AtCoder] NIKKEI Programming Contest 2019 本来看见这一场的排名的画风比较正常就来补一下题,但是完全没有发现后两题的AC人数远少于我补的上一份AtCoder ...
- jsonp跨域获取数据实现百度搜索
本菜鸡最近在写某个页面请求数据时,报了如下的错误. Failed to load https://...:No 'Access-Control-Allow-Origin' header is pres ...
- 爬虫技术:cookies池的维护
一:为什么要维护cookie 1.登录才能爬取内容 2.爬取频繁会被封号. 3.需要维护多个账号的cookie,实现大规模抓取 二:cookies的要求 1.自动登录更新 2.定期筛选验证 3.提供外 ...
- autoit3 脚本自动安装实例
软件自动安装的相关实例!贴出来用于参考,并部分相关语法与示例 #RequireAdmin If DriveMapGet("T:")=="" Then Drive ...
- 如何做好APP功能测试?
一.如何做好app的测试工作? 22 个回答  斗魂大陆 凡是可能会出错的地方,一定会出错!--墨菲法则 腾讯有个平台可以实现适配兼容.服务器压力.性能测试.弱网络.耗电量测试等等,挺全面的.WeT ...
- DELPHI FMX IOS模拟器调试时出现No SDKs could be found
解决办法: 在OSX里打开XCODE,点击XCODE菜单->Perferences->Locations在Commond Line Tools选择XCODE
- 获取数组NSArray元素的className
正确读取NSArray里面元素的Class类型的方法 object_getClass(columnsArray.firstObject) 错误的方法是 [columnsArray.firstObjec ...
- Redis集群的搭建【转】
redis集群的特点: 1.机器多,能够保证redis服务器出现问题后,影响较小 2.自备主从结构,自动的根据算法划分主从结构.动态的实现 3.能够根据主从结构自动的实现高可用 4.实现数据文件的备份 ...
- window安装oracle和创建数据库
原文地址: https://www.cnblogs.com/hoobey/p/6010804.html #11g安装 https://www.cnblogs.com/qq1272850043/p/6 ...
- [CSP-S模拟测试]:养花(分块)
题目描述 小$C$在家种了$n$盆花,每盆花有一个艳丽度$a_i$.在接下来的$m$天中,每天早晨他会从一段编号连续的花中选择一盆摆放在客厅,并在晚上放回.同时每天有特定的光照强度$k_i$,如果这一 ...