You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
561 B
30 lines
561 B
package com.gaotao;
|
|
|
|
import com.gaotao.modules.app.utils.JwtUtils;
|
|
import org.junit.Test;
|
|
import org.junit.runner.RunWith;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
|
@RunWith(SpringRunner.class)
|
|
@SpringBootTest
|
|
public class JwtTest {
|
|
@Autowired
|
|
private JwtUtils jwtUtils;
|
|
|
|
@Test
|
|
public void test() {
|
|
String token = jwtUtils.generateToken(1);
|
|
|
|
System.out.println(token);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|