浏览代码

change method

Looly 4 年之前
父节点
当前提交
6ffa827365

+ 2 - 1
CHANGELOG.md

@@ -3,7 +3,7 @@
 
 -------------------------------------------------------------------------------------------------------------
 
-# 5.5.8 (2021-01-21)
+# 5.5.8 (2021-01-22)
 
 ### 新特性
 * 【extra  】     增加自动装配SpringUtil类(pr#1366@Github)
@@ -12,6 +12,7 @@
 * 【core   】     补充StrUtil.padXXX注释(issue#I2E1S7@Gitee)
 * 【core   】     修改上传文件检查逻辑
 * 【core   】     修正LocalDateTimeUtil.offset方法注释问题(issue#I2EEXC@Gitee)
+* 【extra  】     VelocityEngine的getRowEngine改为getRawEngine(issue#I2EGRG@Gitee)
 
 ### Bug修复
 * 【core   】     修复FileUtil.move以及PathUtil.copy等无法自动创建父目录的问题(issue#I2CKTI@Gitee)

+ 12 - 0
hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityEngine.java

@@ -68,8 +68,20 @@ public class VelocityEngine implements TemplateEngine {
 	 *
 	 * @return 原始引擎对象
 	 * @since 4.3.0
+	 * @deprecated 拼写错误了,请使用{@link #getRawEngine()}
 	 */
+	@Deprecated
 	public org.apache.velocity.app.VelocityEngine getRowEngine() {
+		return getRawEngine();
+	}
+
+	/**
+	 * 获取原始的引擎对象
+	 *
+	 * @return 原始引擎对象
+	 * @since 5.5.8
+	 */
+	public org.apache.velocity.app.VelocityEngine getRawEngine() {
 		return this.engine;
 	}
 

+ 8 - 1
hutool-http/src/test/java/cn/hutool/http/HttpUtilTest.java

@@ -295,7 +295,7 @@ public class HttpUtilTest {
 		String encodeResult = HttpUtil.normalizeParams("参数", CharsetUtil.CHARSET_UTF_8);
 		Assert.assertEquals("%E5%8F%82%E6%95%B0", encodeResult);
 	}
-	
+
 	@Test
 	public void getMimeTypeTest() {
 		String mimeType = HttpUtil.getMimeType("aaa.aaa");
@@ -318,4 +318,11 @@ public class HttpUtilTest {
 		final String s = HttpUtil.get(url);
 		Console.log(s);
 	}
+
+	@Test
+	public void tjhrTest(){
+		String url = "https://www.51tjhr.com";
+		final String s = HttpUtil.get(url);
+		Console.log(s);
+	}
 }