Giter VIP home page Giter VIP logo

spring-boot-api-seedling's Introduction

Hello world! This is Zoctan. 👋

  • 🔭 I’m working on TV station.
  • 🌱 Currently learning anything I interesting.
  • 😄 Walking on the road of non-standard programmers.

spring-boot-api-seedling's People

Contributors

moshuying avatar zoctan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

spring-boot-api-seedling's Issues

如果以jar方式启动无法读取rsa证书文件

原代码(无法读取):

 private byte[] replaceAndBase64Decode(
 final String file, final String headReplace, final String tailReplace) throws Exception {
    // 从 classpath:resources/ 中加载资源
    final ResourceLoader loader = new DefaultResourceLoader();
    final File f = loader.getResource(file).getFile();
    final FileInputStream fis = new FileInputStream(f);
    final DataInputStream dis = new DataInputStream(fis);
    final byte[] keyBytes = new byte[(int) f.length()];
    dis.readFully(keyBytes);
    dis.close();

    final String keyPEM =
       new String(keyBytes).replace(headReplace, "").trim().replace(tailReplace, "").trim();

   return Base64.decodeBase64(keyPEM);

}

更改后的代码:

 private byte[] replaceAndBase64Decode(
        final String file, final String headReplace, final String tailReplace) throws Exception {
    // 从 classpath:resources/ 中加载资源
    final ClassPathResource resource = new ClassPathResource(file);
    final InputStream fis = resource.getInputStream();
    final byte[] keyBytes = IOUtils.toByteArray(fis);
    final String keyPEM =
            new String(keyBytes).replace(headReplace, "").trim().replace(tailReplace, "").trim();

    return Base64.decodeBase64(keyPEM);
}

entity 主键生成问题

将entity主键生成方式改为
@GeneratedValue(strategy = GenerationType.TABLE, generator = "account_id_gen" )
@TableGenerator(name = "account_id_gen", table = "generator_table", pkColumnName = "gen_name", valueColumnName = "next_val", pkColumnValue = "user_account_id_gen", initialValue = 1000, allocationSize = 1 )
启动的时候报错:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountServiceImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountMapper' AccountMapper.class]: Invocation of init method failed; nested exception is tk.mybatis.mapper.MapperException: tk.mybatis.mapper.MapperException: tk.mybatis.mapper.MapperException: userAccountId - 该字段@GeneratedValue配置只允许以下几种形式: 1.useGeneratedKeys的@GeneratedValue(generator=\"JDBC\") 2.类似mysql数据库的@GeneratedValue(strategy=GenerationType.IDENTITY[,generator="Mysql"])

jwt token有效问题?

感谢作者的分享,很优秀的项目 。想问下 jwt token失效之后怎么在请求获取token, 如果用在生产这块逻辑怎么做呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.