Assert.hasText(uniqueNo,"编码前缀查询异常了"); Controller 验证类 import org.springframework.util.Assert; Assert.hasText(uniqueNo,"编码前缀查询异常了");