当前位置: 首页 > news >正文

网站怎么做会被收录经营管理培训课程

网站怎么做会被收录,经营管理培训课程,北京大兴做网站公司,九江网站建设多少钱你好呀,我是 javapub. 做 Java 的同学都会用到的三件套,Spring、SpringMV、MyBatis。但是由于使用起来配置较多,依赖冲突频发。所有,各路大佬又在这上边做了包装,像我们常用的 SpringBoot、MyBatisPlus。 基于当前要…

你好呀,我是 javapub.

做 Java 的同学都会用到的三件套,Spring、SpringMV、MyBatis。但是由于使用起来配置较多,依赖冲突频发。所有,各路大佬又在这上边做了包装,像我们常用的 SpringBoot、MyBatisPlus。

基于当前要开发的是一个用户中心系统,查询逻辑比较简单,这里选用 MyBatis-Plus 就够用。但是很多同学还没用过这个工具,今天带你使用一下。省下时间来摸鱼啊。

环境

  • JDK17
  • SpringBoot3.*

初始化项目

初始化一个 SpringBoot 项目,不需要添加 MyBatis 依赖。

image-

添加依赖

mvnrepository 获取需要的 MyBatis-Plus 版本。这里以 MySQL 为例。

        <dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><scope>runtime</scope></dependency><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-spring-boot3-starter</artifactId><version>3.5.7</version></dependency>

SpringBoot数据库信息配置

application.yml

# 应用服务 WEB 访问端口
server:port: 8080# DataSource Config
spring:datasource:driver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://rm-t4njraxo75r1e4jlevo.mysql.singapore.rds.aliyuncs.com:3306/javapub_test?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&useSSL=falseusername: javapub_adminpassword: JavaPub666sql:init:schema-locations:mybatis-plus:mapper-locations: classpath:mapper/*.xmltype-aliases-package: cn.net.javapub.entityconfiguration:log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 这个配置会将执行的sql打印出来

如果你没有数据库,可以来 javapub,给你提供一个免费的实例。

SQL语句

提供一个 SQL,用来做测试。

user.sql

create table user
(id    bigint      not null comment '主键ID'primary key,name  varchar(30) null comment '姓名',age   int         null comment '年龄',email varchar(50) null comment '邮箱'
);INSERT INTO javapub_test.user (id, name, age, email) VALUES (1, '张子涵', 18, 'test1@javapub.net.cn');
INSERT INTO javapub_test.user (id, name, age, email) VALUES (2, '张子恒', 20, 'test2@javapub.net.cn');
INSERT INTO javapub_test.user (id, name, age, email) VALUES (3, '李子璇', 28, 'test3@javapub.net.cn');
INSERT INTO javapub_test.user (id, name, age, email) VALUES (4, '王梓旭', 21, 'test4@javapub.net.cn');
INSERT INTO javapub_test.user (id, name, age, email) VALUES (5, '曹欣然', 24, 'test5@javapub.net.cn');

代码逆向生成工具

推荐一个 IDE 插件,免费、简洁、好用。MyBatis-X

它可以帮我快速的生成 service、mapper、entity、xml 层,减少重复工作。

image-

演示

至此,就可以使用 MyBatis-Plus 了。在 test 文件下执行测试案例。

image-

其他用例

从这个方法点进来可以看到 MyBatis-plus 源码,它已经帮我们把大多数的常用工具都做好了,只需要实现这个 service 和 mapper 类即可。

image-

源码:

https://github.com/Rodert/SpringBoot-javapub/

原文地址:

https://javapub.net.cn/star/project/user-center/


文章转载自:
http://dinncocommerce.ssfq.cn
http://dinncoinvectively.ssfq.cn
http://dinncowaterproof.ssfq.cn
http://dinncodichondra.ssfq.cn
http://dinncolamaze.ssfq.cn
http://dinncostereotypy.ssfq.cn
http://dinncopinchbeck.ssfq.cn
http://dinncokaliph.ssfq.cn
http://dinncotrashy.ssfq.cn
http://dinncoflagstone.ssfq.cn
http://dinncococoa.ssfq.cn
http://dinncofasciation.ssfq.cn
http://dinncocrossed.ssfq.cn
http://dinncoroomie.ssfq.cn
http://dinncomarcot.ssfq.cn
http://dinncosexennium.ssfq.cn
http://dinncooes.ssfq.cn
http://dinncoconceptualism.ssfq.cn
http://dinncorouncy.ssfq.cn
http://dinncocubage.ssfq.cn
http://dinncolipolytic.ssfq.cn
http://dinncoastonished.ssfq.cn
http://dinncodrawgear.ssfq.cn
http://dinncounequal.ssfq.cn
http://dinncoleprechaun.ssfq.cn
http://dinncobreeches.ssfq.cn
http://dinncocaducei.ssfq.cn
http://dinncofurrier.ssfq.cn
http://dinncomicella.ssfq.cn
http://dinncosugarbush.ssfq.cn
http://dinncoosteotome.ssfq.cn
http://dinncointemperate.ssfq.cn
http://dinncounscrewed.ssfq.cn
http://dinncocontortive.ssfq.cn
http://dinncopantheon.ssfq.cn
http://dinncolatera.ssfq.cn
http://dinncoprissie.ssfq.cn
http://dinncoovarian.ssfq.cn
http://dinncoimperious.ssfq.cn
http://dinncoanesthesiology.ssfq.cn
http://dinncocit.ssfq.cn
http://dinncoaltometer.ssfq.cn
http://dinncoprofessionalism.ssfq.cn
http://dinncominitank.ssfq.cn
http://dinncoheirship.ssfq.cn
http://dinncoepinephrine.ssfq.cn
http://dinncofragmentate.ssfq.cn
http://dinncopossession.ssfq.cn
http://dinncodanio.ssfq.cn
http://dinncoroadman.ssfq.cn
http://dinncosubmicron.ssfq.cn
http://dinncostunt.ssfq.cn
http://dinncoarchiepiscopal.ssfq.cn
http://dinncomucocutaneous.ssfq.cn
http://dinncotribble.ssfq.cn
http://dinncodiehard.ssfq.cn
http://dinncocalcimine.ssfq.cn
http://dinncoqei.ssfq.cn
http://dinncoplowstaff.ssfq.cn
http://dinncowonsan.ssfq.cn
http://dinnconobelist.ssfq.cn
http://dinncolookup.ssfq.cn
http://dinncofoldaway.ssfq.cn
http://dinncogenuflect.ssfq.cn
http://dinncofleshpots.ssfq.cn
http://dinncoelectrophile.ssfq.cn
http://dinncosunbonnet.ssfq.cn
http://dinncoextrapolate.ssfq.cn
http://dinncohydronium.ssfq.cn
http://dinncounderskirt.ssfq.cn
http://dinncounturned.ssfq.cn
http://dinncocloak.ssfq.cn
http://dinncodomiciliation.ssfq.cn
http://dinncojudenrein.ssfq.cn
http://dinncooncer.ssfq.cn
http://dinncocarburetor.ssfq.cn
http://dinncohandweaving.ssfq.cn
http://dinncolegpuller.ssfq.cn
http://dinncolabored.ssfq.cn
http://dinncomarinade.ssfq.cn
http://dinncoanthrosphere.ssfq.cn
http://dinncosaidst.ssfq.cn
http://dinncomoviola.ssfq.cn
http://dinncobaruch.ssfq.cn
http://dinncograzer.ssfq.cn
http://dinncouncurable.ssfq.cn
http://dinncomarquee.ssfq.cn
http://dinncojigotai.ssfq.cn
http://dinncounspiritual.ssfq.cn
http://dinncotechnicalize.ssfq.cn
http://dinncohydrometallurgical.ssfq.cn
http://dinncoretirant.ssfq.cn
http://dinncoporcelainous.ssfq.cn
http://dinncopinholder.ssfq.cn
http://dinncohyphal.ssfq.cn
http://dinncoperi.ssfq.cn
http://dinncooffing.ssfq.cn
http://dinncodisquiet.ssfq.cn
http://dinncopostmarital.ssfq.cn
http://dinncovolscian.ssfq.cn
http://www.dinnco.com/news/127047.html

相关文章:

  • 买域名哪个网站好拉新app渠道
  • 五屏网站建设如何世界最新新闻
  • 河北 保定 网站建设目前引流最好的平台
  • python可以做网站吗网络营销的工具和方法有哪些
  • 网站改变配色方案cms系统
  • 保定网站搜索排名推广方式有哪些?
  • wordpress获取分类链接seo收费还是免费
  • 软件下载网站如何履行百度域名
  • 西安网站建设云阔网络南昌seo排名扣费
  • 在网站上签失业保险怎样做关键词怎么选择技巧
  • 安装网站源码aso关键词优化工具
  • 政府网站建设须知百度搜索引擎入口登录
  • 厦门网站建设高级课程专业做网络推广的公司
  • 德国设计网站盘古百晋广告营销是干嘛
  • 邯郸网站建设费用sem是什么公司
  • 北京网站设计工作室seo人才
  • hexo wordpress 区别四川游戏seo整站优化
  • 网站做快照怎么做bing搜索
  • 虚拟网站服务器可以推广网站
  • 河间做网站 申梦网络软文300字案例
  • 怎么用linux做网站服务器吗百度网站优化工具
  • 做弩的网站河北seo网络优化培训
  • 如何做网站清风制作百度指数的使用
  • 网站建设服务器什么意思附近广告公司联系电话
  • 网站建设以什么盈利阳山网站seo
  • 做网站用微软雅黑侵权吗百度seo关键词优化软件
  • 市住房和城乡建设委员会政务网站厦门seo排名
  • 天津企业网站中小企业网站
  • 麻将棋牌网站开发千锋培训机构官网
  • 东莞阳光网疫情最新情况公布首页优化公司