###前提・実現したいこと
Spring bootを使ってWebアプリを作成しているのですが、初期表示画面で、whitelabel error pageになってしまいます。
localhost:8080とlocalhost:8080/「プロジェクト名」でアクセスして、404が表示されます。
以下、コントローラー、index.html(初期表示画面)、pom.xmlを記載します。
@Controller @RequestMapping("/") public class LoginController { @RequestMapping(method = RequestMethod.GET) public String index(){ return "index"; } }
index.html
resource/templates の直下においてあります。
<!DOCTYPE html> <html xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="UTF-8"/> <title>Insert title here</title> </head> <body> test </body> </html>
pom.xml
dependenciesの中身のみ記載しております。
その他の部分は、プロジェクト作成時からいじっておりません。
<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.3.0</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> </dependencies>
###補足情報(言語/FW/ツール等のバージョンなど)
Mac版のSTSで開発しております。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/05/29 11:31
2017/05/29 12:15
2017/05/29 13:38