working chuck joke app

master
marius 2019-01-06 15:25:10 +01:00
parent a77f7f14db
commit a58638cb56
2 changed files with 16 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package com.becausesec.chuckjokes.services
import guru.springframework.norris.chuck.ChuckNorrisQuotes
import org.springframework.stereotype.Component
import org.springframework.stereotype.Service
@Service
@ -8,6 +9,7 @@ interface JokeService {
val joke:String
}
@Component
class JokeServiceImpl:JokeService {
val chuckNorrisQuotes : ChuckNorrisQuotes = ChuckNorrisQuotes()

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Jokes</title>
</head>
<body>
<p th:text="${joke}">
Insert joke!
</p>
</body>
</html>