JAVA-13222

This commit is contained in:
panagiotiskakos 2022-07-10 15:27:33 +03:00
parent 58c7385029
commit ac7354648f
3 changed files with 27 additions and 0 deletions

View File

@ -8,6 +8,8 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
@SpringBootApplication(scanBasePackages = "com.baeldung.boot.jsp")
public class SpringBootJspApplication extends SpringBootServletInitializer {
//comment below if deploying outside web container -->
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(SpringBootJspApplication.class);

View File

@ -0,0 +1,15 @@
package com.baeldung.boot.jsp.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("/")
public class HomeController {
@GetMapping("")
public String index() {
return "index";
}
}

View File

@ -0,0 +1,10 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<title>View Books</title>
</head>
<body>
<div> This is index page </div>
</body>
</html>