You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceAutoConfiguration.java
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,7 @@ public MessageSource messageSource() {
Copy file name to clipboardExpand all lines: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.java
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@
22
22
* Configuration properties for Message Source.
23
23
*
24
24
* @author Stephane Nicoll
25
+
* @author Kedar Joshi
25
26
* @since 2.0.0
26
27
*/
27
28
publicclassMessageSourceProperties {
@@ -57,6 +58,11 @@ public class MessageSourceProperties {
57
58
*/
58
59
privatebooleanalwaysUseMessageFormat = false;
59
60
61
+
/**
62
+
* Set whether to use the message code as default message instead of throwing a NoSuchMessageException.
63
+
*/
64
+
privatebooleanuseCodeAsDefaultMessage = false;
65
+
60
66
publicStringgetBasename() {
61
67
returnthis.basename;
62
68
}
@@ -97,4 +103,11 @@ public void setAlwaysUseMessageFormat(boolean alwaysUseMessageFormat) {
Copy file name to clipboardExpand all lines: spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/MessageSourceAutoConfigurationTests.java
0 commit comments