Merge pull request #9337 from kirill-vlasov/BAEL-3824

BAEL-3824 Circular view path exception
This commit is contained in:
Greg 2020-06-11 18:58:58 -04:00 committed by GitHub
commit 6d6e62edeb
6 changed files with 99 additions and 0 deletions

View File

@ -0,0 +1,7 @@
## Spring Boot MVC
This module contains articles about Spring Web MVC in Spring Boot projects.
### Relevant Articles:
- More articles: [[prev -->]](/spring-boot-modules/spring-boot-mvc-2)

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-boot-mvc-3</artifactId>
<name>spring-boot-mvc-3</name>
<packaging>jar</packaging>
<description>Module For Spring Boot MVC Web</description>
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-boot-2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-2</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,21 @@
package com.baeldung.circularviewpath;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* Spring Boot launcher for an application
*
*/
@SpringBootApplication(scanBasePackages = "com.baeldung.controller.circularviewpath")
public class CircularViewPathApplication {
/**
* Launches a Spring Boot application
*
* @param args null
*/
public static void main(String[] args) {
SpringApplication.run(CircularViewPathApplication.class, args);
}
}

View File

@ -0,0 +1,16 @@
package com.baeldung.controller.circularviewpath;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class CircularViewPathController {
/**
* A request mapping which may cause circular view path exception
*/
@GetMapping("/path")
public String path() {
return "path";
}
}

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
</configuration>

View File

@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>path.html</title>
</head>
<body>
<p>path.html</p>
</body>
</html>