working chuck joke app

This commit is contained in:
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 package com.becausesec.chuckjokes.services
import guru.springframework.norris.chuck.ChuckNorrisQuotes import guru.springframework.norris.chuck.ChuckNorrisQuotes
import org.springframework.stereotype.Component
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
@Service @Service
@ -8,6 +9,7 @@ interface JokeService {
val joke:String val joke:String
} }
@Component
class JokeServiceImpl:JokeService { class JokeServiceImpl:JokeService {
val chuckNorrisQuotes : ChuckNorrisQuotes = ChuckNorrisQuotes() 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>