因为时刚刚才学spring boot ,第一次碰到的问题,花了半个小时终于明白了,SpringBoot 的application类会自动扫描子包类下的mapping方法,因此application类不能放在与子包同一级目录下.如果放在同一级目录下就会报”Whitelabel Error Page“…
[背景]spring-boot项目,打包成可执行jar,项目内有两个带有main方法的类并且都使用了@SpringBootApplication注解(或者另一种情形:你有两个main方法并且所在类都没有使用@SpringBootApplication注解),pom.xml如下 <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin<…
在搭建Flask框架安装mysqlclient模块时候老是报fatal error: Python.h:错误,折腾老半天,百度了老半天看了不少大神帖子,就是没解决, 后来发现这不是个BUG,都是自己的错,自己的锅自己背着以后不能背. 这的确不是bug,而是pip3没有安装,解决方法安装pip3就好 sudo apt install python3-pip…
前言: 虽然springboot内嵌了一个tomcat,但是这个内嵌的tomcat不支持jsp页面,所以需要引入其他包 解决: maven引入以下包即可 <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> <scope>provided</scope> </depend…
参考 https://bbs.csdn.net/topics/392187702…
报错:Consider defining a bean of type 'xxxxxxxxxxxxx' in your configuration 1. 你应该在 ApplyApplication 启动类里,扫描你的 Service包,多包扫描方法如下 @SpringBootApplication(scanBasePackages = {"xx.xxx.apply.controller", "xx.xxx.apply.service.*", "xx.xxx…
原因是classpath的路径过长导致,在网上看了很多文章,发现解决方法有2种: 1.更改项目路径 或者 maven本地库的路径,减少classpath的深度. 2.由于这是eclipse自身的bug,可以通过给eclipse打补丁来彻底解决[推荐] 我的eclipse版本是3.5.1的,若与我一样版本的同学可以下载下面网址中jar,替换掉plugins中的对应jar即可. http://jianguoyun.com/p/DWeuLbsQx5jkBRimkwk. 如果没有符合的版本,需要自己手动…
按照教程,写了个最简单的 HelloWorld,尼玛报错 -->Whitelabel Error Page 404. 网上99%都是项目结构不对,说什么 Application放在父级 package.然而我这个这么简单居然也报404. 注意: 前端模版用templates的话,必须引入 thymeleaf依赖. <dependency> <groupId>org.springframework.boot</groupId> <artifactId>s…
在学习SpringBoot显示JSP页面的时候出现了错误,Controller可以正常调用,但是JSP页面就是不能正常显示. whitelabel error page 解决:注释掉scope <dependency>             <groupId>org.apache.tomcat.embed</groupId>             <artifactId>tomcat-embed-jasper</artifactId>    …
13.2 Spring Boot启动报错:Whitelabel Error Page 13.2 Spring Boot启动报错:Whitelabel Error Page 问题描述 Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Tue Mar 28 22:25:43 CST 2017 There was an unex…