Commit 5b1cbf3a by fsn

测试完善

parent 34c62017
package com.stylefeng.guns.base;
import com.stylefeng.guns.GunsApplication;
import org.junit.runner.RunWith;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootConfiguration
@SpringBootTest(classes = GunsApplication.class)
public class BaseTest {
}
package com.stylefeng.guns.shiro;
import org.springframework.util.Base64Utils;
import java.io.UnsupportedEncodingException;
import java.util.Arrays;
public class Base64Test {
/**
* Shiro 记住密码采用的是AES加密,AES key length 需要是16位,该方法生成16位的key
*/
public static void main(String[] args) {
String keyStr = "guns";
byte[] keys;
try {
keys = keyStr.getBytes("UTF-8");
System.out.println(Base64Utils.encodeToString(Arrays.copyOf(keys, 16)));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
}
......@@ -19,7 +19,7 @@ public class DictTest extends BaseTest{
@Test
public void addTest() {
dictService.addDict("测试","1:冻结;2:jiedong;3:接触");
dictService.addDict("测试123123123","1:冻结;2:jiedong;3:接触");
}
@Test
......
......@@ -7,7 +7,7 @@ import com.stylefeng.guns.core.template.engine.base.GunsTemplateEngine;
import java.io.IOException;
/**
* 客户端
* 测试Guns模板引擎
*
* @author fengshuonan
* @date 2017-05-09 20:27
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment