working chuck joke app
This commit is contained in:
parent
a77f7f14db
commit
a58638cb56
@ -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()
|
||||
|
14
src/main/resources/templates/chucknorris.html
Normal file
14
src/main/resources/templates/chucknorris.html
Normal 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>
|
Loading…
Reference in New Issue
Block a user