zoukankan      html  css  js  c++  java
  • 17_10_19 SpringBoot 注意事项

    Spring boot 项目不需要项目名,直接localhost:8080/Contoller的请求路劲

    主要支持thymleaf

    模板:
    <!DOCTYPE html>
    <html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head> 
    <meta charset="UTF-8" /> 
    <title>Title</title> 
    </head> 
    <body> 
    hellodsdswdsdsds
    </body>
    </html>
    

    要支持jsp的话:

    1.在建立项目时,不勾选thymeleaf
    2.在poml中加入
    <!-- JSTL for JSP -->
    		<dependency>
    			<groupId>javax.servlet</groupId>
    			<artifactId>jstl</artifactId>
    		</dependency>
    
    		<!-- Need this to compile JSP -->
    		<dependency>
    			<groupId>org.apache.tomcat.embed</groupId>
    			<artifactId>tomcat-embed-jasper</artifactId>
    			<scope>provided</scope>
    		</dependency>
    
    		<!-- Need this to compile JSP,
    			tomcat-embed-jasper version is not working, no idea why -->
    		<dependency>
    3.在application.properties中配置前后缀
    spring.mvc.view.prefix:/
    spring.mvc.view.suffix:.jsp
    

  • 相关阅读:
    HDU 1285
    HDU 1251
    HDU 1166
    UVA 10003
    HDU 5968
    CodeForces 371C
    POJ 2456
    POJ 2250
    oracle的start with connect by prior
    Hibernate session中的createCriteria方法
  • 原文地址:https://www.cnblogs.com/du1991/p/7694160.html
Copyright © 2011-2022 走看看