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中不能识别,将其转化为对象对应的日期属性.而是抛出异常信息 ... 
随机推荐
- leetcode之删除数组中的重复值(26题)
			给定一个排序数组,你需要在原地删除重复出现的元素,使得每个元素只出现一次,返回移除后数组的新长度. 不要使用额外的数组空间,你必须在原地修改输入数组并在使用 O(1) 额外空间的条件下完成. 示例 1 ... 
- Python的pip源切换为国内阿里云镜像
			Python的pip源切换为国内阿里云镜像 找到用户目录 C:\Users\用户\pip,如果不存在就新建该文件夹. 新建文件pip.ini,并用文本编辑器输入以下内容并保存 [global] ind ... 
- Struts第一个程序。
			1:创建完程序后.先写web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmln ... 
- 基于SSM的RBAC权限系统(1)-利用ajax,bootstrap,ztree完成权限树功能
			仅支持回显以及选择,不支持在树中的编辑 搭建后台回显以及修改的模块 JSON数据封装 public class Msg { private int code; private String msg; ... 
- python里的深浅拷贝
			拷贝就是拷贝,何来深浅之说? Python中,对象的赋值,拷贝(深/浅拷贝)之间是有差异的,如果使用的时候不注意,就可能产生意外的结果 其实这个是由于共享内存导致的结果 拷贝:原则上就是把数据分离出来 ... 
- python/pandas 正则表达式 re模块
			目录 正则解说 中文字符集 re模块常用方法 1.正则解说 数量词的贪婪模式与非贪婪模式 正则表达式通常用于在文本中查找匹配的字符串.Python里数量词默认是贪婪的(在少数语言里也可能是默认非贪婪) ... 
- Linux操作系统(一)_常用命令
			1.系统工作命令 date 显示/设置系统时间或日期 date:显示时间 date -s “20190319 11:35:56”:设置时间 clock 显示设置硬件时钟 clock -s:以硬件时 ... 
- PAT_A1069#The Black Hole of Numbers
			Source: PAT A1069 The Black Hole of Numbers (20 分) Description: For any 4-digit integer except the o ... 
- Selenium:火狐Try Xpath插件替代Firebug和Firepath
			什么是Xpath? XPath是XML的路径语言,通俗一点讲就是通过元素的路径来查找到这个标签元素. 工具 Xpath的练习建议大家安装火狐浏览器后,下载插件,try path. 在Selenium中 ... 
- Mysql 2019-07-01
