IntelliJ IDEA 2017版 SpringBoot的关闭自动配置和自定义Banner


.png)
package com.example.demo; import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; @Controller
@SpringBootApplication(exclude = {RedisAutoConfiguration.class,ServletWebServerFactoryAutoConfiguration.class})
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan
public class Application { @RequestMapping("hello")
@ResponseBody
public String hello(){
return "hello world!";
} public Application() {
} public static void main(String[] args) {
// SpringApplication.run(Application.class, args);
SpringApplication springApplication = new SpringApplication(Application.class);
springApplication.setBannerMode(Banner.Mode.OFF);
springApplication.run(args);
}
}
IntelliJ IDEA 2017版 SpringBoot的关闭自动配置和自定义Banner的更多相关文章
- IntelliJ IDEA 2017版 spring-boot加载jsp配置详解(详细图文实例)
一.创建项目 (File--->New-->Project) 2.项目配置内容 3.选择配置项目的Group包名,Artifact项目名称 4.选择项目类型为web类型 5.创建成功,点击 ...
- IntelliJ IDEA 2017版 spring-boot修改端口号配置把端口号改为8081
1.修改端口号主要是通过配置文件修改.如图: 完整版配置 ######################################################## ###server 配置信息 ...
- IntelliJ IDEA 2017版 spring-boot2.0.2 自动配置Condition
描述: 编译器修改参数 -Dfile.encoding=GBK -Dstr.encoding=GBK Condition位置: 某一个类或注解存在的时候,装配,否则不装配 相关代码: ...
- IntelliJ IDEA 2017版 SpringBoot的web项目补充
一.注解 @SpringBootApplication:Spring Boot项目的核心注解,主要目的是开启自动配置. @Configuration:这是一个配置Sprin ...
- IntelliJ IDEA 2017版 SpringBoot的Json字符串返回
一.说明 SpringBoot框架已经自动封装好json字符串解析,所以我们只需要用它的注解来返回操作就可以了. 二.实战 1.书写一个实体类User,设置属性id和name package com. ...
- IntelliJ IDEA 2017版 SpringBoot的核心配置详解
Spring Boot的核心 (1)Spring Boot的项目一般都会有*Application的入口类,入口类中会有main方法,这是一个标准的Java应用程序的入口方法. (2)@Spri ...
- IntelliJ IDEA 2017版 spring-boot 实现jpa基本部署,通过实体类自动建立数据库
一.添加Spring Boot JPA-Hibernate步骤 1.在pom.xml添加mysql,spring-data-jpa依赖 2.在application.properties文件 ...
- IntelliJ IDEA 2017版 SpringBoot徒手书写HelloWorld
1.打开编译器,选择File---->New---->Project 2.弹出设置界面,选择如图样式的1.2.3 3.设置包名称 4.继续next 5.finish完成即可 6.自动生成目 ...
- IntelliJ IDEA 2017版 spring-boot 2.0.5 邮件发送简单实例 (三)
一.搭建SpringBoot项目 详见此文:https://www.cnblogs.com/liuyangfirst/p/8298588.html 注意: 需要添加mail依赖的包,同时还添加了lom ...
随机推荐
- 模板引擎-freemarker
Freemarker 是一款模板引擎,是一种基于模版生成静态文件的通用 工具,它是为java程序员提供的一个开发包. 可通过将Word或者Excel模板另存为xml格式,在其中修改要替换的内容. 基本 ...
- 在客户端浏览器中点击下载生成excel
生成excel的样式,里面的数据已经写好,使用apache,poi来写的. 1.首先是controller /** *下载服务结构体Excel * *@return */ @RequestMappin ...
- vue-cli 上手
1.cnpm install --global vue-cli 安装脚手架 2.vue init webpack baoge 创建 3.选择配置项 Project name (baoge): ---- ...
- centos7 防火墙配置
firewall-cmd --zone=public --add-port=80/tcp --permanentfirewall-cmd --zone=public --add-port=8080/t ...
- eclipse中创建多模块maven web项目
本文讲述在eclipse中创建分模块maven web项目. 暂时将一个项目分为controller:service:dao以及父类模块四部分. 1.创建父类模块. 创建一个简单的maven proj ...
- oc 中的id类型与类型转换
id是oc语言中一个独特的数据类型.一种通用对象类型.可以转换为任何数据类型,即id类型的变量可以存放任何数据类型的对象. 使用示例: Animal * dog = [[Dog alloc]init] ...
- NISP视频知识点总结
身份认证访问控制安全审计本章实验 ===密码学=====古典密码 算法本身的保密性近代密码 机械密码\机电 密码打字密码机轮转机现代密码 基于密钥公钥密码 公钥==================对称 ...
- [故障引起的故事]URL中带加号的处理
问题起因: 客户订购了一关键字为"e+h 变送器" , 在首页推荐广告中,会根据用户在search 搜索过的关键字进行一个匹配投放.技术实现是UED 通过JS 获取coo ...
- javascript 中 if (window != top) top.location.href = location.href;的意思
如果当前窗口不是顶级窗口,就强制修改为顶级窗口: 目的是为了不让别人用iframe嵌入你的页面
- JPA报错, PersistenceException_Unable to build Hibernate SessionFactory
javax.persistence.PersistenceException: [PersistenceUnit: TestJPA] Unable to build Hibernate Session ...