在我的项目中,我UUID.fromString()用来将字符串转换为UUID,但如果字符串不是UUID类型,它将抛出exception,那么如何验证这个字符串?
在我的国际资源中,代码是
:post_badge_format = You've earned the "{0}" badge for {1}.
Run Code Online (Sandbox Code Playgroud)
在我的java中
码:String messageContent = MessageFormat.format(messageType, paramValues);
Run Code Online (Sandbox Code Playgroud)
messageContent的期望值应该是这样的:
You've earned the "XXX" badge for XXX.
Run Code Online (Sandbox Code Playgroud)
但是messageContent的实际值是这样的:
You've earned the "{0}" badge for {1}.
Run Code Online (Sandbox Code Playgroud)
为什么?
在我的项目中,我使用spring,但cassandra不支持事务.如何在服务层中操作cassandra的事务?