我正在尝试在我的项目中使用jsp,但是很难。我将这两个依赖项放在 pom.xml 中
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
<!-- If you want to use JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
Run Code Online (Sandbox Code Playgroud)
然后我将这两行放入 aplication.properties 中
spring.mvc.view.prefix=/WEB-INF/views/
spring.mvc.view.suffix=.jsp
Run Code Online (Sandbox Code Playgroud)
我创建了一个名为“index.jsp”的页面并将其放入
<h1>
INDEX
</h1>
<p>
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Aspernatur nam, nisi, repudiandae illum
ab a aut maxime deleniti voluptas praesentium dicta delectus. Voluptatibus consequuntur
necessitatibus hic eum suscipit, sequi autem.
</p>
Run Code Online (Sandbox Code Playgroud)
还有我的控制器:
package com.example.curso.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class IndexController {
@GetMapping("/")
public String index() { …Run Code Online (Sandbox Code Playgroud) 我想安装 vue.js 版本 2 来使用 vuetify。但是,我不知道该命令。有人可以将命令传递给我吗
我正在为自己开发一个网站,纯粹且没有服务器语言。
url 与 a 标记中的名称相同,例如:blog / index.html。
我可以用什么东西来改变它吗?我不想使用框架。我想知道是否有任何工具可以做到这一点。
我想改变的是结局。我不想显示扩展名,只显示路线