SpringBoot入门七,添加默认静态首页

目录resources/static下创建index.html文件即可(路径与文件名称均不可改变)

原文地址:http://blog.51cto.com/1197822/2288018

时间: 2024-07-30 11:44:53

SpringBoot入门七,添加默认静态首页的相关文章

MVC4.0 如何设置默认静态首页index.shtml

1.不启用二级域名情况下(www.xxx.com)下设置默认静态首页index.shtml 通过配置IIS的默认文档,设置默认首页地址 然后在MVC的路由中写入忽略默认路由代码 routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute(""); routes.MapRoute( name: "Default", url: "{controller}/{act

SpringBoot入门九,添加shiro支持

项目基本配置参考SpringBoot入门一,使用myEclipse新建一个SpringBoot项目,使用myEclipse新建一个SpringBoot项目即可.现在来给项目添加shiro支持,数据暂时硬编码,不连接数据库,具体内容如下: 1. pom.xml添加以下配置信息 <!-- 开启shiro依赖 --> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-s

SpringBoot入门三,添加log4j2支持

项目基本配置参考文章SpringBoot入门一,使用myEclipse新建一个SpringBoot项目,使用myEclipse新建一个SpringBoot项目即可.现在来给项目添加一个log4j2支持,添加方式非常简单,仅需两步即可,具体内容如下: 1. pom.xml将原有的 logback 移除 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot

SpringBoot入门四,添加MyBatis支持

项目基本配置参考SpringBoot入门一,使用myEclipse新建一个SpringBoot项目,使用myEclipse新建一个SpringBoot项目即可.现在来给项目添加一个MyBatis支持,添加方式非常简单,仅需两步即可,具体内容如下: 1. pom.xml添加以下配置信息 数据源采用最新的hikari,据说性能相当牛X,想了解的可以去百度一下 <!-- 引入默认连接池,SpringBoot2.x采用hikari连接池 --> <dependency> <group

SpringBoot入门十三,添加RabbitMq

一. 概念说明 Broker:简单来说就是消息队列服务器实体.Exchange:消息交换机,它指定消息按什么规则,路由到哪个队列.Queue:消息队列载体,每个消息都会被投入到一个或多个队列.Binding:绑定,它的作用就是把exchange和queue按照路由规则绑定起来.Routing Key:路由关键字,exchange根据这个关键字进行消息投递.vhost:虚拟主机,一个broker里可以开设多个vhost,用作不同用户的权限分离.producer:消息生产者,就是投递消息的程序.co

SpringBoot入门二,添加JdbcTemplate数据源

项目基本配置参考上一篇文章SpringBoot入门一,使用myEclipse新建一个SpringBoot项目即可.现在来给项目添加一个JdbcTemplate数据源,添加方式非常简单,仅需两步即可,具体内容如下: 1. pom.xml添加以下配置信息 <!-- jdbcTemplate依赖 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring

SpringBoot入门八,添加定时任务

SpringBoot添加定时任务非常简单,只需要两步即可 1. SpringBoot启动类 添加@EnableScheduling注解,开启定时任务的配置 import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.Ena

springboot 入门七-静态资源处理

Spring Boot 默认配置的/**映射到/static(或/public ,/META-INF/resources),/webjars/**会映射到classpath:/META-INF/resources/webjars/.但也可以通过spring.mvc.static -path- pattern来调优.例如,将所有资源重新定位到/resources/ * *可以实现如下:spring.mvc.static-path-pattern=/resources/** ---resources

SpringBoot入门六,添加ehcache缓存

1.pom.xml文件添加引用包 <!-- 开启cache缓存支持 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId> </dependency> <!-- 引入ehcache支持 --> <dependency> <gro