Skip to content

Commit 4744a9f

Browse files
committed
chuck-norris-joke
1 parent 82c1628 commit 4744a9f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main/java/in/co/learningville/springbootsample/service/JokeServiceImpl.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010
@Service
1111
public class JokeServiceImpl implements JokeService {
1212

13-
private final ChuckNorrisQuotes chuckNorrisQuote;
1413

14+
private final ChuckNorrisQuotes chuckNorrisQuote;
1515

16-
public JokeServiceImpl() {
17-
this.chuckNorrisQuote = new ChuckNorrisQuotes();
16+
public JokeServiceImpl(ChuckNorrisQuotes chuckNorrisQuote) {
17+
this.chuckNorrisQuote = chuckNorrisQuote;
1818
}
19+
// public JokeServiceImpl() {
20+
// this.chuckNorrisQuote = new ChuckNorrisQuotes();
21+
// }
1922

2023
@Override
2124
public String getJoke() {

0 commit comments

Comments
 (0)