mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-08-18 20:38:02 +08:00
fix code
This commit is contained in:
@@ -16,7 +16,7 @@ public class ArchiverTest {
|
||||
@Ignore
|
||||
public void zipTest(){
|
||||
final File file = FileUtil.file("d:/test/compress/test.zip");
|
||||
StreamArchiver.create(CharsetUtil.CHARSET_UTF_8, ArchiveStreamFactory.ZIP, file)
|
||||
StreamArchiver.create(CharsetUtil.UTF_8, ArchiveStreamFactory.ZIP, file)
|
||||
.add(FileUtil.file("d:/Java"), (f)->{
|
||||
Console.log("Add: {}", f.getPath());
|
||||
return true;
|
||||
@@ -28,7 +28,7 @@ public class ArchiverTest {
|
||||
@Ignore
|
||||
public void tarTest(){
|
||||
final File file = FileUtil.file("d:/test/compress/test.tar");
|
||||
StreamArchiver.create(CharsetUtil.CHARSET_UTF_8, ArchiveStreamFactory.TAR, file)
|
||||
StreamArchiver.create(CharsetUtil.UTF_8, ArchiveStreamFactory.TAR, file)
|
||||
.add(FileUtil.file("d:/Java"), (f)->{
|
||||
Console.log("Add: {}", f.getPath());
|
||||
return true;
|
||||
@@ -40,7 +40,7 @@ public class ArchiverTest {
|
||||
@Ignore
|
||||
public void cpioTest(){
|
||||
final File file = FileUtil.file("d:/test/compress/test.cpio");
|
||||
StreamArchiver.create(CharsetUtil.CHARSET_UTF_8, ArchiveStreamFactory.CPIO, file)
|
||||
StreamArchiver.create(CharsetUtil.UTF_8, ArchiveStreamFactory.CPIO, file)
|
||||
.add(FileUtil.file("d:/Java"), (f)->{
|
||||
Console.log("Add: {}", f.getPath());
|
||||
return true;
|
||||
@@ -52,7 +52,7 @@ public class ArchiverTest {
|
||||
@Ignore
|
||||
public void sevenZTest(){
|
||||
final File file = FileUtil.file("d:/test/compress/test.7z");
|
||||
CompressUtil.createArchiver(CharsetUtil.CHARSET_UTF_8, ArchiveStreamFactory.SEVEN_Z, file)
|
||||
CompressUtil.createArchiver(CharsetUtil.UTF_8, ArchiveStreamFactory.SEVEN_Z, file)
|
||||
.add(FileUtil.file("d:/Java/apache-maven-3.6.3"), (f)->{
|
||||
Console.log("Add: {}", f.getPath());
|
||||
return true;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.hutool.extra.servlet;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.text.StrUtil;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.hutool.extra.spring;
|
||||
|
||||
import cn.hutool.core.lang.reflect.TypeReference;
|
||||
import cn.hutool.core.reflect.TypeReference;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import lombok.Data;
|
||||
import org.junit.Assert;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.hutool.extra.spring;
|
||||
|
||||
import cn.hutool.core.lang.reflect.TypeReference;
|
||||
import cn.hutool.core.reflect.TypeReference;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import lombok.Data;
|
||||
import org.junit.Assert;
|
||||
|
||||
@@ -21,7 +21,7 @@ public class SftpTest {
|
||||
@Before
|
||||
@Ignore
|
||||
public void init() {
|
||||
sshjSftp = new SshjSftp("ip", 22, "test", "test", CharsetUtil.CHARSET_UTF_8);
|
||||
sshjSftp = new SshjSftp("ip", 22, "test", "test", CharsetUtil.UTF_8);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package cn.hutool.extra.template;
|
||||
|
||||
import cn.hutool.core.map.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.text.StrUtil;
|
||||
import cn.hutool.extra.template.engine.jetbrick.JetbrickEngine;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package cn.hutool.extra.template;
|
||||
|
||||
import cn.hutool.core.map.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.text.StrUtil;
|
||||
import cn.hutool.extra.template.TemplateConfig.ResourceMode;
|
||||
import cn.hutool.extra.template.engine.beetl.BeetlEngine;
|
||||
import cn.hutool.extra.template.engine.enjoy.EnjoyEngine;
|
||||
|
||||
@@ -12,7 +12,7 @@ public class VelocityTest {
|
||||
public void charsetTest(){
|
||||
final TemplateConfig config = new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH);
|
||||
config.setCustomEngine(VelocityEngine.class);
|
||||
config.setCharset(CharsetUtil.CHARSET_GBK);
|
||||
config.setCharset(CharsetUtil.GBK);
|
||||
final TemplateEngine engine = TemplateUtil.createEngine(config);
|
||||
Template template = engine.getTemplate("velocity_test_gbk.vtl");
|
||||
String result = template.render(Dict.create().set("name", "hutool"));
|
||||
|
||||
Reference in New Issue
Block a user