首先在application.properties中设置好访问界面的前后缀

spring-boot访问不到jsp

在src | main 新建文件夹webapp,在webapp中新建WEB-INF | jsp文件夹,在jsp文件夹中新建*.jsp文件.

项目目录结构:

spring-boot访问不到jsp

controller类:

spring-boot访问不到jsp

此时可尝试在浏览器中进行访问:localhost:8080/showUser;若访问不到(/WEB-INF/jsp/*.jsp not found!),则可以尝试以下操作:

Run | Edit Configurations...;选择Environment,在Working directory中选中自己要运行的项目,Apply | OK 

spring-boot访问不到jsp

 

相关文章:

  • 2021-11-01
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
  • 2022-02-06
  • 2021-11-24
猜你喜欢
  • 2021-08-07
  • 2021-10-16
  • 2022-12-23
  • 2021-07-06
  • 2021-11-17
  • 2022-01-19
  • 2021-06-13
相关资源
相似解决方案