Spring Boot sets the default homepage, the method experiment is as follows
Attach the Application startup code
/*** @ClassName Application* @Description Spring-Boot website startup class* @author kevin.tian* @Date 2018-03* @version 1.0.0*/@SpringBootApplication@PropertySource(value={ "file:${APP_HOME_CONF}/overpayment-web/overpayment-web.properties", "file:${APP_HOME_CONF}/overpayment-web/db.properties"})@ImportResource({"file:${APP_HOME_CONF}/overpayment-web/spring.xml"})public class Application extends SpringBootServletInitializer {public static void main(String[] args){try {SpringApplication.run(Application.class);} catch (Exception e) {// TODO: handle exceptione.printStackTrace();}}}1. Place the default homepage default.html,
Location is in /src/main/resources/static/default.html
2. Add IndexController controller and set index routing
The test results are as follows
Let's take a look at the new features of Spring Boot 2.0
Having said so much, what are the changes and new features of Spring Boot 2.0 and 1.0?
•JDK minimum requirements are 1.8+ and supports 1.9;
•Supports Spring webflux/webflux.fn responsive web programming;
• Provides responsive automatic configuration and starter POMs for Spring Data Cassandra, MongoDB, Couchbase and Redis;
• Supports embedded Netty;
•HTTP/2 support: Tomcat, Undertow and Jetty;
• New architecture that supports Spring MVC, WebFlux and Jersey;
• Enhanced Micrometer integration, metrics based on Atlas, Datadog, Ganglia, Graphite, Influx, JMX, New Relic, Prometheus, SignalFx, StatsD and Wavefront;
•Quartz scheduling support;
•Extremely simplifies security automatic configuration;
Summarize
The above is the implementation code for the Spring Boot 2.0 setting of the default homepage of the website introduced by the editor. If you have any questions, please leave it to me.
I will reply to everyone in time. Thank you very much for your support to Wulin.com website!