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

一般网站图标是用什么做的网件路由器无线中继

一般网站图标是用什么做的,网件路由器无线中继,网站建设开发方式包括,做网站前期费用前言 前面快速学习了Mybatis#xff0c;现在开始快速学习MyBatisPlus 学习教程#xff1a; 黑马mybatis教程全套视频教程#xff0c;2天Mybatis框架从入门到精通 黑马程序员最新MybatisPlus全套视频教程#xff0c;4小时快速精通mybatis-plus框架 简介 MyBatisPlus 是…前言 前面快速学习了Mybatis现在开始快速学习MyBatisPlus 学习教程 黑马mybatis教程全套视频教程2天Mybatis框架从入门到精通 黑马程序员最新MybatisPlus全套视频教程4小时快速精通mybatis-plus框架 简介 MyBatisPlus 是基于MyBatis框架基础上开发的增强型工具旨在简化开发、提高效率。 创建项目 创建项目 问了一下后端同事建议是创建一个springboot项目在springboot项目里使用mybatis-plus。参考了两篇文章给弄出来了下面是基本步骤如果遇到啥问题别找我不会。我是搞前端开发的学后端属于公司要求。 参考的文章 搭建SpringBoot项目三种方式(超详细版) Spring Boot MyBatis MySQL框架搭建 1、修改为阿里源 https://start.aliyun.com/ 2、设置项目名称、其他配置 3、选择springboot版本和依赖 4、下载依赖并运行 下载完依赖后切换到SpringbootApplication.java文件里点击运行 运行成功并且能在浏览器里访问证明项目成功 项目配置 添加mybatis-plus和mysql依赖 在pom.xml里添加依赖 !-- mybatis plus-- dependencygroupIdcom.baomidou/groupIdartifactIdmybatis-plus-boot-starter/artifactIdversion3.5.1/version /dependency !-- mysql-- dependencygroupIdmysql/groupIdartifactIdmysql-connector-java/artifactIdversion8.0.28/version /dependencymysql的依赖要与你的mysql保持一致。 添加完依赖后下载。 配置数据库信息 在src/main/resources/application.properties文件里添加数据库信息 # MySQL spring.datasource.urljdbc:mysql://localhost:3306/test spring.datasource.usernameroot spring.datasource.password123abc!# spring.datasource.driver-class-namecom.mysql.cj.jdbc.Driver创建实体类 在src/main/java/org/example/springboot文件夹下创建entity文件夹用于存放实体类。在entity下创建实体类User.java public class User {Integer id;String name;Integer age;String email;Integer sex;public Integer getId() {return id;}public void setId(Integer id) {this.id id;}public String getName() {return name;}public void setName(String name) {this.name name;}public Integer getAge() {return age;}public void setAge(Integer age) {this.age age;}public String getEmail() {return email;}public void setEmail(String email) {this.email email;}public Integer getSex() {return sex;}public void setSex(Integer sex) {this.sex sex;}Overridepublic String toString() {return User{ id id , name name \ , age age , email email \ , sex sex };}}创建mapper接口 在src/main/java/org/example/springboot文件夹下创建mapper文件夹用于存放实体类。在mapper下创建接口UseMapperr.java import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; import org.example.springboot.entity.User;import java.util.List;// 继承mybatis-plus的BaseMapper接口 Mapper public interface UserMapper extends BaseMapperUser {// 查询所有用户ListUser selectAllUser(); }创建UserMapper.xml 在src/main/resources目录下创建一个名为mapper的文件夹并在其中创建一个名为UserMapper.xml的文件。这里要注意的是文件路径不要错了。 ?xml version1.0 encodingUTF-8 ? !DOCTYPE mapperPUBLIC -//mybatis.org//DTD Mapper 3.0//ENhttp://mybatis.org/dtd/mybatis-3-mapper.dtd!-- namespace: 命名空间 resultType:返回值的类型一般是实体类 id:唯一标识 -- mapper namespaceorg.example.springboot.mapper.UserMapperresultMap iduserResultMap typeorg.example.springboot.entity.User!-- property 属性是指对应的 Java 类的属性column 属性是指对应的数据库表的字段名 --!-- 主键映射--id propertyid columnid//resultMap!-- 查询所有用户--select idselectAllUser resultMapuserResultMapselect *from user;/select/mapper创建Service和Controller 在src/main/java/org/example/springboot文件夹下创建service文件夹。在service下创建接口UserService.java import org.example.springboot.entity.User; import org.example.springboot.mapper.UserMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service;import java.util.ArrayList; import java.util.Arrays; import java.util.List;Service public class UserService {Autowiredprivate UserMapper userMapper;public ListUser selectAllUser() {// 查询id为1、2的用户ListInteger idList new ArrayList();idList.add(1);idList.add(2);return userMapper.selectBatchIds(idList);} }在src/main/java/org/example/springboot文件夹下创建controller文件夹。在controller下创建接口UserController.java import org.example.springboot.entity.User; import org.example.springboot.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody;import java.util.List;Controller public class UserController {Autowiredprivate UserService userService;RequestMapping(/userlist)ResponseBodypublic ListUser selectAllUser() {return userService.selectAllUser();} }测试 重启项目在浏览器里访问userlist看能否从数据库获取到数据
http://www.pierceye.com/news/289014/

相关文章:

  • 手机 网站 开发淘宝店铺网站策划书
  • 网站建设规划方案书滨州网站建设 中企动力
  • 网站建设品牌推荐做网站必须要公网ip
  • 做网站卖东西赚钱wordpress微信网站
  • 商丘网站建设有限公司店面设计费用
  • 张店学校网站建设公司合肥有哪些seo网络公司
  • 做博客网站的空间容量需要多少北京简盟产品设计有限公司
  • 哪些网站怎么进定制开发平台
  • 【郑州网站建设】wordpress自定义后台单页模板
  • 铭誉摄影网站北京网站建设开发
  • 单位还能建设网站吗做网站的程序员留备份
  • 松江团购做网站产品开发的基本流程
  • 织梦后台网站栏目空白小广告制作
  • 钦州建设局网站云南网站建设招商
  • 韩国风格网站php源码网站怎么放到服务器上
  • 网站调优yandex搜索引擎入口
  • 医院网站建设具体内容商丘网站制作电话
  • 别人做的网站直播网站
  • 足球梦网站建设的基本思路沧州做企业网站
  • 招标建设网站什么是微信wordpress
  • 建设银行网站连不上成都网站快照优化公司
  • 网站 永久关停 请示广州网站建设骏域网站
  • 个人建站模板外国网站翻墙怎么做
  • 保定网站设计制作公司有经验的中山网站建设
  • 免费网站建设那个好wordpress本地怎么上传服务器
  • 自己做的网站加载慢WordPress模板首页文件是啥
  • 教学网站建设网站建设岗位有哪些
  • 网站建设合同的验收表网页网站的区别是什么
  • 开福区网站建设中wordpress调用所有栏目
  • 网站建设的流程是什么意思青岛做网站公司