Skip to content

Commit cf11a68

Browse files
committed
Sync with talks
1 parent 36fbc25 commit cf11a68

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

blocking-service/src/main/java/com/example/Word.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ public class Word {
1616
private String text;
1717

1818
@Transient
19-
private String data;
19+
private String computedData;
2020

2121
}

blocking-service/src/main/java/com/example/WordService.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ public List<Word> findWords(@RequestParam int limit) {
2424
}
2525

2626
private Word fillData(Word word) {
27-
BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
28-
String encoded = encoder.encode(word.getText());
29-
word.setData(encoded);
27+
String encoded = new BCryptPasswordEncoder().encode(word.getText());
28+
word.setComputedData(encoded);
3029
return word;
3130
}
3231

reactive-service/src/main/java/com/example/reactiveservice/Word.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ public class Word {
1111

1212
private String text;
1313

14-
private String data;
14+
private String computedData;
1515

1616
}

reactive-service/src/main/java/com/example/reactiveservice/WordService.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ public Flux<Word> findWords(@RequestParam int limit) {
2222
}
2323

2424
private Word fillData(Word word) {
25-
BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
26-
String encoded = encoder.encode(word.getText());
27-
word.setData(encoded);
25+
String encoded = new BCryptPasswordEncoder().encode(word.getText());
26+
word.setComputedData(encoded);
2827
return word;
2928
}
3029

0 commit comments

Comments
 (0)