Skip to content
This repository was archived by the owner on Jan 4, 2024. It is now read-only.

Commit 2ad4a94

Browse files
committed
Having minimal valid HTML retrieved from "/"-endpoint
1 parent 6773080 commit 2ad4a94

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
package schulte.markus.seleniumstandalonechromespringboot.controller;
22

3+
import org.springframework.stereotype.Controller;
34
import org.springframework.web.bind.annotation.GetMapping;
4-
import org.springframework.web.bind.annotation.RestController;
5+
import org.springframework.web.bind.annotation.ResponseBody;
56

6-
@RestController
7+
@Controller
78
public class HelloController {
89

9-
private static final String ENDPOINT = "/";
10-
11-
@GetMapping(ENDPOINT)
10+
@GetMapping
11+
@ResponseBody
1212
public String index() {
13-
return "<h1 id=\"h1-hello\">Hello world!</h1>";
13+
return "<!DOCTYPE html><html lang=\"en\">"
14+
+ "<head><title>Selenium standalone Chrome / Spring Boot demo</title></head>"
15+
+ "<body><h1 id=\"h1-hello\">Hello world!</h1>";
1416
}
1517
}

0 commit comments

Comments
 (0)