Merge pull request #12477 from panos-kakos/JAVA-13222

Java 13222
This commit is contained in:
kwoyke 2022-07-15 09:31:12 +02:00 committed by GitHub
commit ab3a728721
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>Index page</title>
</head>
<body>
<div> This is index page </div>
</body>
</html>