黄飞鸿的gravatar头像
黄飞鸿 2017-02-16 09:59:28

spring boot+Mybatis+maven自动生成Mapping持久化层代码

包视图说明:
    com.hp.actions 存放Action
    com.hp.conf    Spring @Configuration 配置类,包括启用事务
    com.hp.conf.logs  日志管理类
    com.hp.domain   domain对象
    com.hp.interceptors web拦截器
    com.hp.mapping  Mybatis持久化操作Mapping
    com.hp.services  服务接口
    
maven mybatis 自动生成Mapping类
    右击pom.xml --> run --> Maven build 弹出窗口,在  goals 设置   mybatis-generator:generate
    注意,需要在 src/main/resources/generatorConfig.xml 中指定mysql驱动的jar包

启动aspectj
  运行 com.hp.App --> Run configurations 在 vm arguments 中设置 -javaagent:runlib/aspectjweaver-1.8.9.jar 
  保存运行
  
  浏览器访问:
  http://127.0.0.1:81/ (81 在 aplication.prpperties中配置,该文件由spring boot 自动加载)
    默认访问文件 src/main/resources/static/index.html 

代码包视图:

spring boot+Mybatis+maven自动生成Mapping持久化层代码

启动效果:

spring boot+Mybatis+maven自动生成Mapping持久化层代码

浏览器访问:

spring boot+Mybatis+maven自动生成Mapping持久化层代码


打赏

文件名:spring-mybatis.zip,文件大小:10649.177K 下载
最代码最近下载分享源代码列表最近下载
212600  LV7 2022年3月9日
gxpcwm  LV22 2021年2月25日
zaizai21312  LV10 2020年6月12日
qicheng96  LV1 2020年5月18日
清咿酱  LV11 2020年5月7日
k麝神k  LV10 2020年3月29日
huangtingting  LV2 2019年9月18日
lyzuidaima  LV7 2019年3月17日
winqble  LV16 2019年3月14日
Zhao5970  LV2 2019年2月10日
最代码最近浏览分享源代码列表最近浏览
denliv_hui  LV13 4月2日
hyx666110  LV2 3月2日
3320151533  LV1 1月7日
3334004690  LV3 2023年11月1日
李亮  LV19 2023年3月6日
sunlea  LV17 2023年2月23日
dengjunjun  LV15 2023年1月5日
bai620123  LV16 2022年11月29日
duxiangyun 2022年10月26日
暂无贡献等级
shufsjnjksf  LV1 2022年10月18日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友