一、创建普通的maven的web项目

2、配置KD42WF_Part1下的pom.xml

 <?xml version="1.0" encoding="UTF-8"?>

 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <groupId>cn.kgc</groupId>
<artifactId>KD42WF_Part1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging> <name>KD42WF_Part1 Maven Webapp</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<dependencies>
<!--配置springboot分页插件-->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.3</version>
</dependency>
</dependencies> </project>

pom.xml

二、common模块: 在项目下创建一个空的maven的普通工程的子common模块

3、在Common模块下创建实体类Classes.java

 package cn.kgc.pojo;
import java.io.Serializable;
/**
* 持久化类一定要进行序列化,否则请求数据时会报错
*/
public class Classes implements Serializable{
private Integer cid;
private String cname; public Classes() {
} public Classes(Integer cid, String cname) {
this.cid = cid;
this.cname = cname;
} public Integer getCid() {
return cid;
} public void setCid(Integer cid) {
this.cid = cid;
} public String getCname() {
return cname;
} public void setCname(String cname) {
this.cname = cname;
} @Override
public String toString() {
return "Classes{" +
"cid=" + cid +
", cname='" + cname + '\'' +
'}';
}
}

Classes.java

4、在Common模块下创建实体类Student.java

 package cn.kgc.pojo;
public class Student {
private Integer sid;
private String sname;
private String password;
private String subject;
private Double score;
private Classes classes; public Student() {
} public Student(Integer sid, String sname, String password, String subject, Double score, Classes classes) {
this.sid = sid;
this.sname = sname;
this.password = password;
this.subject = subject;
this.score = score;
this.classes = classes;
} public Integer getSid() {
return sid;
} public void setSid(Integer sid) {
this.sid = sid;
} public String getSname() {
return sname;
} public void setSname(String sname) {
this.sname = sname;
} public String getPassword() {
return password;
} public void setPassword(String password) {
this.password = password;
} public String getSubject() {
return subject;
} public void setSubject(String subject) {
this.subject = subject;
} public Double getScore() {
return score;
} public void setScore(Double score) {
this.score = score;
} public Classes getClasses() {
return classes;
} public void setClasses(Classes classes) {
this.classes = classes;
} @Override
public String toString() {
return "Student{" +
"sid=" + sid +
", sname='" + sname + '\'' +
", password='" + password + '\'' +
", subject='" + subject + '\'' +
", score=" + score +
", classes=" + classes +
'}';
}
}

Student.java

5、在Common模块下创建服务接口ClassesService.java

 package cn.kgc.service;

 import cn.kgc.pojo.Classes;

 import java.util.List;

 /**
* Created by Administrator on 2019/3/12.
*/
public interface ClassesService {
List<Classes> optionData();
}

ClassesService.java

6、在Common模块下创建服务接口StudentService.java

 package cn.kgc.service;

 import cn.kgc.pojo.Student;
import com.github.pagehelper.PageInfo; import java.util.Map; /**
* Created by Administrator on 2019/3/12.
*/
public interface StudentService {
PageInfo<Map<String,Object>> showPage(Integer pageno, Integer pagesize, Map<String,Object> map);
}

StudentService.java

三、创建provider的模块:  springboot的provider提供者子模块

四、创建Cosumer模块

1、springboot+mybatis+zookeeper+dubbox+maven+pagehelper的更多相关文章

  1. easy-table-vue+VueJs、SpringBoot+Mybatis实现MVVM模型前后台数据交互

    该项目分为前端展示部分和后台服务部分. 前端部分 使用的技术是:NodeJs.Webpack.VueJs 使用的组件库是:IVIEW.easy-table-vue 使用的开发工具是:WebStorm ...

  2. 7、SpringBoot+Mybatis整合------PageHelper简单分页

    开发工具:STS 代码下载链接:https://github.com/theIndoorTrain/SpringBoot_Mybatis/tree/1d30d2a573ce6784149a28af9b ...

  3. 1、SpringBoot+Mybatis整合------简单CRUD的实现

    编译工具:STS 代码下载链接:https://github.com/theIndoorTrain/SpringBoot_Mybatis01/commit/b757cd9bfa4e2de551b2e9 ...

  4. 9、SpringBoot+Mybatis整合------动态sql

    开发工具:STS 前言: mybatis框架中最具特色的便是sql语句中的自定义,而动态sql的使用又使整个框架更加灵活. 动态sql中的语法: where标签 if标签 trim标签 set标签 s ...

  5. 2、SpringBoot+Mybatis整合------一对一

    开发工具:STS 代码下载链接:https://github.com/theIndoorTrain/SpringBoot_Mybatis01/tree/93398da60c647573645917b2 ...

  6. 使用idea 搭建一个 SpringBoot + Mybatis + logback 的maven 项目

    (注意项目名不能有大写......),把项目类型 改成 War 类型.(web项目) 使用 mybatis-generator 插件 生成 实体类 和 接口 在 resources 目录 中 新建一个 ...

  7. 8、SpringBoot+Mybatis整合------参数取值方式

    前言: 我们知道,在mybatis中,参数取值方式有两种: #{ } 和 ${ } 下面,我们来探讨下#{ }与${ }不同. 一.#{ } 例: select * from student wher ...

  8. 6、SpringBoot+Mybatis整合------参数传递

    开发工具:STS 代码下载链接:https://github.com/theIndoorTrain/SpringBoot_Mybatis/tree/7892801d804d2060774f3720f8 ...

  9. 5、SpringBoot+Mybatis整合------多对多

    开发工具:STS 代码下载链接:https://github.com/theIndoorTrain/SpringBoot_Mybatis/tree/3baea10a3a1104bda815c20695 ...

随机推荐

  1. 新随笔(三)什么时候使用button,什么时候使用文字链接

    新随笔(三)什么时候使用button.什么时候使用文字链接 你为什么在这个地方用button而不用文字链接呢? 这是刚才我问一个设计师的问题. 她抬头看我,眼神迷茫.说:"没什么为什么呀,我 ...

  2. Codeforces Round #276 (Div. 1) A. Bits 贪心

    A. Bits   Let's denote as  the number of bits set ('1' bits) in the binary representation of the non ...

  3. SQL数据库问题 解释一下下面的代码 sql 存储过程学习

    SQL数据库问题 解释一下下面的代码 2008-08-13 11:30wssqyl2000 | 分类:数据库DB | 浏览1154次 use mastergocreate proc killspid( ...

  4. JNDI 笔记(一) 概述

    很多地方都会用到JNDI,一大堆的缩写加上一大堆不清不楚的概念描述,使得在看到的时候都不认识,更不要说使用了.   JNDI,Java Naming Directory Interface,J2EE的 ...

  5. Codeforces--630I--Parking Lot(规律)

     I - Parking Lot Crawling in process... Crawling failed Time Limit:500MS     Memory Limit:65536KB  ...

  6. 0509 关于Ajax + 三级联动示例

    关于Ajax 1.干什么的? ajax负责抓取用户名信息,传递给服务器进行校验: 2.属性: onreadystatechange:事件,该事件可以感知ajax状态(readyState)的变化.aj ...

  7. selenium3 + python - cookie定位

    from selenium import webdriverfrom selenium.webdriver.support.wait import WebDriverWaitimport time d ...

  8. Django day08 多表操作 (三) 基于对象的跨表查询 基于双下划线的多表查询

    一: 基于对象的跨表查询 1. 一对一 正向: 反向: 2. 一对多 正向: 反向: 3.多对多 正向: 反向: 4.*****基于对象的多表查询 二: 基于双下划线的多表查询 1. 连表查询 一对一 ...

  9. Rancher 2:添加 NFS client provisioner 动态提供 Kubernetes 后端存储卷

    一.前提说明 1.说明: NFS client provisioner 利用 NFS Server 给 Kubernetes 作为持久存储的后端,并且动态提供PV. 默认 rancher 2 的存储类 ...

  10. layui框架 各种小结

    首先项目前端采用的是bootstrap和layui弹窗,验证,表格用的是bootstrapTable layui官方地址:http://www.layui.com/ 文档:http://www.lay ...