BeanDefinitionVisitor.java中protected String resolveStringValue(String strVal) { if (this.valueResolver == null) { throw new IllegalStateException("No StringValueResolver specified - pass a resolver " + "object into the constructor or override the 'resolveStringValue' method"); } String resolvedValue = this.valueResolver.resolveStringValue(strVal); // Return original String if not modified. return (strVal.equals(resolvedValue) ? strVal : resolvedValue); }
直接return resolvedValue不就可以了。return (strVal.equals(resolvedValue) ? strVal : resolvedValue);
Spring源码浅评
最新推荐文章于 2023-02-24 13:44:34 发布