• Spring MyBatis的枚举类型


    最近困扰我事:

    1. 枚举类型在前端如何表现出来, 现在发现(花了几乎一天时间), 是将原本数据库里面的int类型, 转成了String,

    在application.properties文件中配置

    mybatis.configuration.default-enum-type-handler=org.apache.ibatis.type.EnumOrdinalTypeHandler

    然后加入枚举类型.

    如果是xml配置文件则是:

    <typeHandlers>
            <typeHandler handler="org.apache.ibatis.type.EnumOrdinalTypeHandler"
                         javaType="com.wulala.smbframework.sm.type.ExampleType"/>
            <typeHandler handler="org.apache.ibatis.type.EnumOrdinalTypeHandler"
                         javaType="com.wulala.smbframework.sm.type.SkillType"/>
    </typeHandlers>

    可见spring boot的配置果然智能(傻瓜)

    2. 安全性

    交换token的事儿, 还不熟, 感觉挺抵触的...

    3. mybatis部分应该跟springboot部分分开么? 还是应该合在一个项目里面?

    4. RESTful

    键值, 下划线还是应该驼峰?include怎么实现?

  • 相关阅读:
    CentOS7 防火墙firewalld详细操作
    bootstrap-datetimepicker 滚动错位问题
    Contos更换python版本
    centos7.3下使用yum 安装pip
    备注
    jenkins与SVN 问题记录
    kafka配置
    Jenkins 与github配置
    nginx File not found 错误
    nginx 总结
  • 原文地址:https://www.cnblogs.com/Montauk/p/10392517.html
Copyright © 2020-2023  润新知