commit
ab3a728721
|
@ -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);
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
|
@ -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>
|
Loading…
Reference in New Issue