Spring Boot : Whitelabel Error Page解决方案
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <groupId>com.demo</groupId>
<artifactId>Demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging> <name>Demo</name>
<description>Demo project for Spring Boot</description> <parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties> <dependencies> <dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.1</version>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
</exclusion>
</exclusions>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency> </dependencies> <build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build> </project>
package com.demo.controller; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import com.demo.domain.User;
import com.demo.service.UserService; @Controller
@RequestMapping(value = "/uc")
public class UserController { @Autowired
private UserService userService; @ResponseBody
@RequestMapping("/stemp.htm")
private String sYeMian(User user){
System.out.println("进了方法 syso"); User u = new User();
u.setMuBan(user.getMuBan()); int i = userService.sYeMian(u); if (i>0){
return "存储成功";
}
return "存储失败";
}
}
package com.demo.example.demo; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication
public class Demo1Application { public static void main(String[] args) {
SpringApplication.run(Demo1Application.class, args);
}
}


package com.demo.example.demo; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan; @SpringBootApplication
@ComponentScan(basePackages = {"com.demo.controller"})
public class Demo1Application { public static void main(String[] args) {
SpringApplication.run(Demo1Application.class, args);
}
}
package com.demo; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan; @SpringBootApplication
public class Demo1Application { public static void main(String[] args) {
SpringApplication.run(Demo1Application.class, args);
}
}
Spring Boot : Whitelabel Error Page解决方案的更多相关文章
- spring boot: Whitelabel Error Page的解决方案
http://blog.csdn.net/u014788227/article/details/53670112
- Spring Boot Web Error Page处理
spring Boot默认是whitelabel error page. 其实我们可以自己处理,由于时间有限,所以就简单说明一下方法. 首先配置 @Configuration public class ...
- spring boot 开始部署报Whitelabel Error Page错解决方法
因为时刚刚才学spring boot ,第一次碰到的问题,花了半个小时终于明白了,SpringBoot 的application类会自动扫描子包类下的mapping方法,因此application类不 ...
- 初学 Spring boot 报错 Whitelabel Error Page 404
按照教程,写了个最简单的 HelloWorld,尼玛报错 -->Whitelabel Error Page 404. 网上99%都是项目结构不对,说什么 Application放在父级 pack ...
- Spring Boot Controller相应JSP页面 错误whitelabel error page
在学习SpringBoot显示JSP页面的时候出现了错误,Controller可以正常调用,但是JSP页面就是不能正常显示. whitelabel error page 解决:注释掉scope < ...
- 《Springboot极简教程》问题解决:Springboot启动报错 Whitelabel Error Page: This application has no explicit mapping for(转)
13.2 Spring Boot启动报错:Whitelabel Error Page 13.2 Spring Boot启动报错:Whitelabel Error Page 问题描述 Whitelabe ...
- Whitelabel Error Page 专题
Spring boot为错误视图提供了如下错误属性:timestamp:错误发生的时间status:HTTP状态码error:错误原因exception:异常的类名message:异常消息(如果这个错 ...
- Whitelabel Error Page异常
做了个简单的springboot项目,一开始所有运行正常,之后写了一天的代码,再运行相同的代码,就一直报以下异常: Whitelabel Error Page This application has ...
- SpringBoot接口服务处理Whitelabel Error Page(转)
To switch it off you can set server.error.whitelabel.enabled=false http://stackoverflow.com/question ...
随机推荐
- linux如何安装java环境
linux安装jdk7步骤: 1.首先使用命令查看linux系统版本号: lsb_release -a 11 2.下载对应的jdk版本,笔者使用的是jdk-7u79-linux-x64.tar.gz: ...
- Django文件上传三种方式以及简单预览功能
主要内容: 一.文件长传的三种方式 二.简单预览功能实现 一.form表单上传 1.页面代码 <!DOCTYPE html> <html lang="en"> ...
- ArcGIS字段计算器分割字段中的字符串
ArcGIS字段计算器分割字段中的字符串 实例:在一个字段中存有长宽高三个属性数据,以x分割.例如sss为字段名(字段属性为文本类型),数据格式为:100x200x300,利用字段计算器分别将三个数存 ...
- 新手数据比赛中数据处理方法小结(python)
第一次参加,天池大数据竞赛(血糖预测),初赛排名1%.因为自己对python不熟悉,所以记录一下在比赛中用到的一些python方法的使用(比较基础细节,大佬绕道): 1.数据初探 data.info( ...
- PL/SQL FAQ in installation "make sure you have the 32 bits Oracle client installed" and "Database character set(AL32UTF8) and Client character set (GBK) are different"
requirement : connecting to remote oracle server . now I know the connectionURL :connectionUrl :jdb ...
- Spring注解装配
Spring 自动装配的主机有 @Autowired.@Intect.@Resource @Autowired是byType的, @Resource是byName的.我们一般用@Atutowired. ...
- CentOS 6.3 64位下MySQL5.1.54源码安装配置详解
安装环境:CentOS 6.3 64位 一:先安装依赖包(不然配置的时候会报错的!) yum -y install ncurses* libtermcap* 新建mysql用户 [root@clien ...
- Redis集群方案怎么做?大牛给你介绍五种方案!
Redis集群方案 Redis数据量日益增大,而且使用的公司越来越多,不仅用于做缓存,同时趋向于存储这块,这样必促使集群的发展,各个公司也在收集适合自己的集群方案,目前行业用的比较多的是下面几种集群架 ...
- confirm显示数组中的内容时,总是带一个逗号分隔的解决方法
问题的关键 就是在给confirm显示之前,将数组转换成字符串,并以每个数组的元素为一个字符串,加上一个换行回车符即可: 代码中的背景色 为关键的点 <script type="tex ...
- _2_head_中标签
创:20_3_2017修:5_4_2017 什么是title标签? --title 页面名(双) -- 整个html的页面名字,相当于一本书的书名 <title>北门吹雪</ti ...