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

7 months ago
  1. package com.gaotao;
  2. import com.gaotao.modules.app.utils.JwtUtils;
  3. import org.junit.Test;
  4. import org.junit.runner.RunWith;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.boot.test.context.SpringBootTest;
  7. import org.springframework.test.context.junit4.SpringRunner;
  8. @RunWith(SpringRunner.class)
  9. @SpringBootTest
  10. public class JwtTest {
  11. @Autowired
  12. private JwtUtils jwtUtils;
  13. @Test
  14. public void test() {
  15. String token = jwtUtils.generateToken(1);
  16. System.out.println(token);
  17. }
  18. }