Java项目:CRM客户关系管理系统(Spring+SpringMVC+MyBatis + maven)(二)

简介: Java项目:CRM客户关系管理系统(Spring+SpringMVC+MyBatis + maven)(二)

3. 客户管理


3.1 查询所有客户


3.1.1 查询所有


需求:查询所有客户


步骤:


步骤1:入口


步骤2:编写Controller


步骤3:编写Service 接口、实现类


步骤4:修改 list.jsp展示数据


步骤1:入口


步骤2:编写Controller


package com.czxy.crm.controller;
import com.czxy.crm.domain.Customer;
import com.czxy.crm.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Controller
@RequestMapping("/customer")
public class CustomerController {
    @Resource
    private CustomerService customerService;
    @RequestMapping("/findAll")
    public String findAll( Model model){
        List<Customer> allCustomer = customerService.findAll();
        model.addAttribute("allCustomer", allCustomer);
        return "customer/list";
    }
}

步骤3:编写Service 接口、实现类

  • 接口
package com.czxy.crm.service;
import com.czxy.crm.domain.Customer;
import java.util.List;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
public interface CustomerService {
    /**
     * 查询所有
     * @return
     */
    List<Customer> findAll();
}

实现类

package com.czxy.crm.service.impl;
import com.czxy.crm.domain.BaseDict;
import com.czxy.crm.domain.Customer;
import com.czxy.crm.mapper.BaseDictMapper;
import com.czxy.crm.mapper.CustomerMapper;
import com.czxy.crm.service.CustomerService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Service
@Transactional
public class CustomerServiceImpl implements CustomerService {
    @Resource
    private CustomerMapper customerMapper;
    @Resource
    private BaseDictMapper baseDictMapper;
    @Override
    public List<Customer> findAll() {
        // 查询所有
        List<Customer> list = customerMapper.selectAll();
        // 关联查询
        list.forEach(customer -> {
            // 客户来源
            BaseDict custSourceBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustSource());
            customer.setCustSourceBaseDict(custSourceBaseDict);
            //客户行业
            BaseDict custIndustryBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustIndustry());
            customer.setCustIndustryBaseDict(custIndustryBaseDict);
            //客户级别
            BaseDict custLevelBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustLevel());
            customer.setCustLevelBaseDict(custLevelBaseDict);
        });
        return list;
    }
}

步骤4:修改 list.jsp展示数据

<c:forEach items="${allCustomer}" var="customer">
    <TR style="FONT-WEIGHT: normal; FONT-STYLE: normal; BACKGROUND-COLOR: white; TEXT-DECORATION: none">
        <TD>${customer.custName }</TD>
        <TD>${customer.custLevelBaseDict.dictItemName }</TD>
        <TD>${customer.custSourceBaseDict.dictItemName }</TD>
        <TD>${customer.custIndustryBaseDict.dictItemName }</TD>
        <TD>${customer.custAddress }</TD>
        <TD>${customer.custPhone }</TD>
        <TD>
        <a href="${pageContext.request.contextPath }/customer/editUI.action?custId=${customer.custId}">修改</a>
        &nbsp;&nbsp;
        <a href="${pageContext.request.contextPath }/customer/delete.action?custId=${customer.custId}" οnclick="return confirm('您确定要删除【${customer.custName }】吗?')">删除</a>
        </TD>
    </TR>   
</c:forEach>


3.1.2 条件查询


需求:


步骤


步骤1:入口,确定查询表单


步骤2:创建CustomerVo,用于封装查询条件


步骤3:修改controller,获得查询条件


步骤4:修改service,使用查询条件


步骤1:入口,确定查询表单


步骤2:创建CustomerVo,用于封装查询条件


///

package com.czxy.crm.vo;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
public class CustomerVo {
    private String custName;
    public String getCustName() {
        return custName;
    }
    public void setCustName(String custName) {
        this.custName = custName;
    }
}

步骤3:修改controller,获得查询条件

package com.czxy.crm.controller;
import com.czxy.crm.domain.Customer;
import com.czxy.crm.service.CustomerService;
import com.czxy.crm.vo.CustomerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Controller
@RequestMapping("/customer")
public class CustomerController {
    @Resource
    private CustomerService customerService;
    @RequestMapping("/findAll")
    public String findAll(CustomerVo customerVo, Model model){
        List<Customer> allCustomer = customerService.findAll(customerVo);
        model.addAttribute("allCustomer", allCustomer);
        return "customer/list";
    }
}

步骤4:修改service,使用查询条件

  • 接口
  • 实现类
package com.czxy.crm.service.impl;
import com.czxy.crm.domain.BaseDict;
import com.czxy.crm.domain.Customer;
import com.czxy.crm.mapper.BaseDictMapper;
import com.czxy.crm.mapper.CustomerMapper;
import com.czxy.crm.service.CustomerService;
import com.czxy.crm.vo.CustomerVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Service
@Transactional
public class CustomerServiceImpl implements CustomerService {
    @Resource
    private CustomerMapper customerMapper;
    @Resource
    private BaseDictMapper baseDictMapper;
    @Override
    public List<Customer> findAll(CustomerVo customerVo) {
        // 1 条件查询
        Example example = new Example(Customer.class);
        Example.Criteria criteria = example.createCriteria();
        if(StringUtils.isNotBlank(customerVo.getCustName())) {
            criteria.andLike("custName", "%"+customerVo.getCustName()+"%");
        }
        // 2 分页查询
        // 3 查询所有
        List<Customer> list = customerMapper.selectByExample(example);
        // 4 关联查询
        list.forEach(customer -> {
            // 客户来源
            BaseDict custSourceBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustSource());
            customer.setCustSourceBaseDict(custSourceBaseDict);
            //客户行业
            BaseDict custIndustryBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustIndustry());
            customer.setCustIndustryBaseDict(custIndustryBaseDict);
            //客户级别
            BaseDict custLevelBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustLevel());
            customer.setCustLevelBaseDict(custLevelBaseDict);
        });
        // 5 封装分页
        return list;
    }
}


3.1.3 分页查询


需求


步骤:



步骤1:修改CustomerVo,获得分页参数


步骤2:修改controller,返回pageInfo


步骤3:修改service,封装PageInfo


步骤4:修改jsp,展示列表数据


步骤5:修改jsp,展示分页条


步骤1:修改CustomerVo,获得分页参数

package com.czxy.crm.vo;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
public class CustomerVo {
    private String custName;
    private Integer pageNum = 1;
    private Integer pageSize = 2;
    // getter和setter
}

步骤2:修改controller,返回pageInfo


步骤3:修改service,封装PageInfo


接口


实现类



/

package com.czxy.crm.service.impl;
import com.czxy.crm.domain.BaseDict;
import com.czxy.crm.domain.Customer;
import com.czxy.crm.mapper.BaseDictMapper;
import com.czxy.crm.mapper.CustomerMapper;
import com.czxy.crm.service.CustomerService;
import com.czxy.crm.vo.CustomerVo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Service
@Transactional
public class CustomerServiceImpl implements CustomerService {
    @Resource
    private CustomerMapper customerMapper;
    @Resource
    private BaseDictMapper baseDictMapper;
    @Override
    public PageInfo<Customer> findAll(CustomerVo customerVo) {
        // 1 条件查询
        Example example = new Example(Customer.class);
        Example.Criteria criteria = example.createCriteria();
        if(StringUtils.isNotBlank(customerVo.getCustName())) {
            criteria.andLike("custName", "%"+customerVo.getCustName()+"%");
        }
        // 2 分页查询
        PageHelper.startPage(customerVo.getPageNum(),customerVo.getPageSize());
        // 3 查询所有
        List<Customer> list = customerMapper.selectByExample(example);
        // 4 关联查询
        list.forEach(customer -> {
            // 客户来源
            BaseDict custSourceBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustSource());
            customer.setCustSourceBaseDict(custSourceBaseDict);
            //客户行业
            BaseDict custIndustryBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustIndustry());
            customer.setCustIndustryBaseDict(custIndustryBaseDict);
            //客户级别
            BaseDict custLevelBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustLevel());
            customer.setCustLevelBaseDict(custLevelBaseDict);
        });
        // 5 封装分页
        return new PageInfo<>(list);
    }
}

步骤4:修改jsp,展示列表数据


步骤5:修改jsp,展示分页条


查询表单


分页条


当前第[<B>${pageInfo.pageNum}</B>]页,共[<B>${pageInfo.total}</B>]条

,每页显示


//

<select οnchange="change(this)">
    <option value="1" ${pageInfo.pageSize == 1 ? 'selected' : ''}>1</option>
    <option value="2" ${pageInfo.pageSize == 2 ? 'selected' : ''}>2</option>
    <option value="3" ${pageInfo.pageSize == 3 ? 'selected' : ''}>3</option>
    <option value="5" ${pageInfo.pageSize == 5 ? 'selected' : ''}>5</option>
    <option value="10" ${pageInfo.pageSize == 10 ? 'selected' : ''}>10</option>
</select>
<c:if test="${pageInfo.pageNum > 1}">
    [<a href="javascript:void(0)" οnclick="page(1)">首页</a>]
    [<a href="javascript:void(0)" οnclick="page(${pageInfo.pageNum - 1})">上一页</a>]
</c:if>
<c:forEach begin="1" end="${pageInfo.pages}" var="num">
    <b><a href="javascript:void(0)" οnclick="page(${num})">${num}</a></b>
</c:forEach>
<c:if test="${pageInfo.pageNum < pageInfo.pages}">
    [<a href="javascript:void(0)" οnclick="page(${pageInfo.pageNum + 1})">下一页</a>]
    [<a href="javascript:void(0)" οnclick="page(${pageInfo.pages})">尾页</a>]
</c:if>
<input type="number" style="width: 35px;" value="${customerVo.pageNum}" id="goId"/>
<input type="button" value="Go" οnclick="page(goId.value)"/>

js函数


function change(obj) {
    // 重置,如果修改了pageSize,从1开始
    pageNumId.value = 1
    // 修改隐藏字段 pageSize
    pageSizeId.value = obj.value
    // 提交表单
    customerFormId.submit()
}
function page(pageNum) {
    // 修改pageNum的值
    pageNumId.value = pageNum
    // 提交表单
    customerFormId.submit()
}


3.2 添加客户


3.2.1 需求


3.2.2 显示表单


步骤:


  • 步骤1:入口


  • 步骤2:修改CustomerController,用于显示 customer/add.jsp 页面


  • 查询数据字典:客户来源(typeCode=002)


  • 查询数据字典:客户行业(typeCode=001)


  • 查询数据字典:客户级别(typeCode=006)


  • 步骤3:编写BaseDictService,通过typeCode查询所有数据字典信息。


  • 步骤4:修改add.jsp,显示字典相关信息


  • 步骤1:入口


  • 步骤2:修改CustomerController,用于显示 customer/add.jsp 页面


  • 查询数据字典:客户来源(typeCode=002)


  • 查询数据字典:客户行业(typeCode=001)


  • 查询数据字典:客户级别(typeCode=006)


package com.czxy.crm.controller;
import com.czxy.crm.domain.BaseDict;
import com.czxy.crm.domain.Customer;
import com.czxy.crm.service.BaseDictService;
import com.czxy.crm.service.CustomerService;
import com.czxy.crm.vo.CustomerVo;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Controller
@RequestMapping("/customer")
public class CustomerController {
    @Resource
    private CustomerService customerService;
    @Resource
    private BaseDictService baseDictService;
    /**
     * 添加页面
     * @return
     */
    @RequestMapping("/addUI")
    public String addUI(Model model) {
        // 客户行业 (typeCode=001)
        List<BaseDict> custIndustryBaseDictList = baseDictService.selectAllByTypeCode("001");
        model.addAttribute("custIndustryBaseDictList",custIndustryBaseDictList);
        // 客户来源(typeCode=002)
        List<BaseDict> custSourceBaseDictList = baseDictService.selectAllByTypeCode("002");
        model.addAttribute("custSourceBaseDictList",custSourceBaseDictList);
        // 客户级别(typeCode=006)
        List<BaseDict> custLevelBaseDictList = baseDictService.selectAllByTypeCode("006");
        model.addAttribute("custLevelBaseDictList",custLevelBaseDictList);
        return "customer/add";
    }
}

步骤3:编写BaseDictService,通过typeCode查询所有数据字典信息。


接口


package com.czxy.crm.service;
import com.czxy.crm.domain.BaseDict;
import java.util.List;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
public interface BaseDictService {
    /**
     * 通过类别代码查询数据字典信息
     * @param dictTypeCode
     * @return
     */
    List<BaseDict> selectAllByTypeCode(String dictTypeCode);
}

实现类


///

package com.czxy.crm.service.impl;
import com.czxy.crm.domain.BaseDict;
import com.czxy.crm.mapper.BaseDictMapper;
import com.czxy.crm.service.BaseDictService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Service
@Transactional
public class BaseDictServiceImpl implements BaseDictService {
    @Resource
    private BaseDictMapper baseDictMapper;
    @Override
    public List<BaseDict> selectAllByTypeCode(String dictTypeCode) {
        // 条件
        Example example = Example.builder(BaseDict.class).build();
        example.createCriteria().andEqualTo("dictTypeCode",dictTypeCode);
        // 查询
        return baseDictMapper.selectByExample(example);
    }
}

步骤4:修改add.jsp,显示字典相关信息

<td>所属行业 :</td>
<td>
    <select name="custIndustry" class=textbox style="WIDTH: 180px">
        <option value="">---请选择---</option>
        <c:forEach items="${custIndustryBaseDictList}" var="industry">
            <option value="${industry.dictId}">${industry.dictItemName}</option>
        </c:forEach>
    </select>
</td>
<td>信息来源 :</td>
<td>
    <select name="custSource" class=textbox style="WIDTH: 180px">
        <option value="non">---请选择---</option>
        <c:forEach items="${custSourceBaseDictList}" var="source">
            <option value="${source.dictId}">${source.dictItemName}</option>
        </c:forEach>
    </select>
</td>
<td>客户级别:</td>
<td>
    <select name="custLevel" class=textbox style="WIDTH: 180px">
        <option value="non">---请选择---</option>
        <c:forEach items="${custLevelBaseDictList}" var="level">
            <option value="${level.dictId}">${level.dictItemName}</option>
        </c:forEach>
    </select>                               
</td>


3.2.3 添加


步骤:


步骤1:修改add.jsp页面,确定表单提交路径 /customer/add.action


步骤2:修改CustomerController,添加add方法,并处理成功和失败。


步骤3:修改CustomerService,添加add方法


步骤4:修改add.jsp,显示错误信息


步骤1:修改add.jsp页面,确定表单提交路径 /customer/add.action


步骤2:修改CustomerController,添加add方法,并处理成功和失败。



/

/**
     * 添加
     * @param customer
     * @return
     */
    @RequestMapping("/add")
    public String add(Customer customer, Model model) {
        try {
            // 添加
            boolean result = customerService.add(customer);
            if(result) {
                // 成功
                return "redirect:/customer/findAll.action";
            } else {
                // 失败
                model.addAttribute("error","添加客户失败");
                return "customer/add";
            }
        } catch (Exception e) {
            e.printStackTrace();
            model.addAttribute("error",e.getMessage());
            return "customer/add";
        }
    }

步骤3:修改CustomerService,添加add方法


接口


 

/**
     * 添加客户
     * @param customer
     * @return
     */
    boolean add(Customer customer);

实现类


 

@Override
    public boolean add(Customer customer) {
        int insert = customerMapper.insertSelective(customer);
        return insert == 1;
    }

步骤4:修改add.jsp,显示错误信息

<%-- 显示错误信息--%>
<span style="color:red">${error}</span>

3.3 修改客户


3.3.1 需求


3.3.2 显示表单,回显数据


步骤:


步骤1:入口 /customer/editUI.action?custId=1


步骤2:修改CustomerController,用于显示 customer/edit.jsp 页面


查询数据字典:客户来源(typeCode=002)


查询数据字典:客户行业(typeCode=001)


查询数据字典:客户级别(typeCode=006)


通过custId查询客户详情


步骤3:编写CustomerService,查询客户详情。


步骤4:修改edit.jsp,显示字典相关信息,回显客户信息。


步骤1:入口 /customer/editUI.action?custId=1


步骤2:修改CustomerController,用于显示 customer/edit.jsp 页面


查询数据字典:客户来源(typeCode=002)


查询数据字典:客户行业(typeCode=001)


查询数据字典:客户级别(typeCode=006)


通过custId查询客户详情

 /**
     * 修改页面
     * @return
     */
    @RequestMapping("/editUI")
    public String editUI(Long custId, Model model) {
        // 客户行业 (typeCode=001)
        List<BaseDict> custIndustryBaseDictList = baseDictService.selectAllByTypeCode("001");
        model.addAttribute("custIndustryBaseDictList",custIndustryBaseDictList);
        // 客户来源(typeCode=002)
        List<BaseDict> custSourceBaseDictList = baseDictService.selectAllByTypeCode("002");
        model.addAttribute("custSourceBaseDictList",custSourceBaseDictList);
        // 客户级别(typeCode=006)
        List<BaseDict> custLevelBaseDictList = baseDictService.selectAllByTypeCode("006");
        model.addAttribute("custLevelBaseDictList",custLevelBaseDictList);
        // 查询客户项
        Customer customer = customerService.selectById(custId);
        model.addAttribute("customer",customer);
        return "customer/edit";
    }

步骤3:编写CustomerService,查询客户详情。

  • 接口
 /**
     * 通过id查询详情
     * @param custId
     * @return
     */
    Customer selectById(Long custId);

实现类

  @Override
    public Customer selectById(Long custId) {
        return customerMapper.selectByPrimaryKey(custId);
    }

步骤4:修改edit.jsp,显示字典相关信息,回显客户信息。

<select name="custIndustry" class=textbox style="WIDTH: 180px">
    <option value="">---请选择---</option>
    <c:forEach items="${custIndustryBaseDictList}" var="industry">
        <option value="${industry.dictId}" ${customer.custIndustry== industry.dictId?"selected":""}>${industry.dictItemName}</option>
    </c:forEach>
</select>
<td>信息来源 :</td>
<td>
    <select name="custSource" class=textbox style="WIDTH: 180px">
        <option value="non">---请选择---</option>
        <c:forEach items="${custSourceBaseDictList}" var="source">
            <option value="${source.dictId}" ${customer.custSource== source.dictId?"selected":""}>${source.dictItemName}</option>
        </c:forEach>
    </select>
</td>
<td>客户级别:</td>
<td>
    <select name="custLevel" class=textbox style="WIDTH: 180px">
        <option value="non">---请选择---</option>
        <c:forEach items="${custLevelBaseDictList}" var="level">
            <option value="${level.dictId}"  ${customer.custLevel==level.dictId?"selected":""}>${level.dictItemName}</option>
        </c:forEach>
    </select>                               
</td>

3.3.3 修改

步骤:


步骤1:修改edit.jsp页面,确定表单提交路径 /customer/edit.action


步骤2:修改CustomerController,添加edit方法,并处理成功和失败。


步骤3:修改CustomerService,添加edit方法


步骤4:修改edit.jsp,显示错误信息


步骤1:修改edit.jsp页面,确定表单提交路径 /customer/edit.action


步骤2:修改CustomerController,添加edit方法,并处理成功和失败。


/

/**
     * 修改
     * @param customer
     * @return
     */
    @RequestMapping("/edit")
    public String edit(Customer customer, Model model) {
        try {
            // 修改
            boolean result = customerService.update(customer);
            if(result) {
                // 成功
                return "redirect:/customer/findAll.action";
            } else {
                // 失败
                model.addAttribute("error","修改客户失败");
                return "customer/edit";
            }
        } catch (Exception e) {
            e.printStackTrace();
            model.addAttribute("error",e.getMessage());
            return "customer/edit";
        }

步骤3:修改CustomerService,添加edit方法

  • 接口
/**
     * 修改
     * @param customer
     * @return
     */
    boolean update(Customer customer);

实现类

   @Override
    public boolean update(Customer customer) {
        int update = customerMapper.updateByPrimaryKeySelective(customer);
        return update == 1;
    }

步骤4:修改edit.jsp,显示错误信息


3.4 删除客户


步骤:


步骤1:入口 customer/delete.action?custId=1


步骤2:修改CustomerController,添加delete方法,删除成功重定向到列表页。


步骤3:修改CustomerService,添加delete方法


步骤1:入口 customer/delete.action?custId=1

<a href="${pageContext.request.contextPath }/customer/delete.action?custId=${customer.custId}" οnclick="return confirm('您确定要删除【${customer.custName }】吗?')">删除</a>

步骤2:修改CustomerController,添加delete方法,删除成功重定向到列表页。

 /**
     * 通过id删除客户
     * @param custId
     * @return
     */
    @RequestMapping("/delete")
    public String delete(Long custId) {
        // 删除
        customerService.deleteById(custId);
        // 重定向列表页
        return "redirect:/customer/findAll.action";
       }

步骤3:修改CustomerService,添加delete方法

  • 接口

    /**
     * 通过id删除
     * @param custId
     */
    void deleteById(Long custId);

实现类

@Override
    public void deleteById(Long custId) {
        customerMapper.deleteByPrimaryKey(custId);
    }


相关文章
|
29天前
|
SQL JavaScript Java
springboot+springm vc+mybatis实现增删改查案例!
springboot+springm vc+mybatis实现增删改查案例!
23 0
|
29天前
|
SQL Java 数据库连接
挺详细的spring+springmvc+mybatis配置整合|含源代码
挺详细的spring+springmvc+mybatis配置整合|含源代码
35 1
|
1天前
|
Java 关系型数据库 MySQL
一套java+ spring boot与vue+ mysql技术开发的UWB高精度工厂人员定位全套系统源码有应用案例
UWB (ULTRA WIDE BAND, UWB) 技术是一种无线载波通讯技术,它不采用正弦载波,而是利用纳秒级的非正弦波窄脉冲传输数据,因此其所占的频谱范围很宽。一套UWB精确定位系统,最高定位精度可达10cm,具有高精度,高动态,高容量,低功耗的应用。
一套java+ spring boot与vue+ mysql技术开发的UWB高精度工厂人员定位全套系统源码有应用案例
|
2天前
|
负载均衡 Java 开发者
细解微服务架构实践:如何使用Spring Cloud进行Java微服务治理
【4月更文挑战第17天】Spring Cloud是Java微服务治理的首选框架,整合了Eureka(服务发现)、Ribbon(客户端负载均衡)、Hystrix(熔断器)、Zuul(API网关)和Config Server(配置中心)。通过Eureka实现服务注册与发现,Ribbon提供负载均衡,Hystrix实现熔断保护,Zuul作为API网关,Config Server集中管理配置。理解并运用Spring Cloud进行微服务治理是现代Java开发者的关键技能。
|
3天前
|
安全 Java 数据安全/隐私保护
使用Spring Security进行Java身份验证与授权
【4月更文挑战第16天】Spring Security是Java应用的安全框架,提供认证和授权解决方案。通过添加相关依赖到`pom.xml`,然后配置`SecurityConfig`,如设置用户认证信息和URL访问规则,可以实现应用的安全保护。认证流程包括请求拦截、身份验证、响应生成和访问控制。授权则涉及访问决策管理器,如基于角色的投票。Spring Security为开发者构建安全应用提供了全面且灵活的工具,涵盖OAuth2、CSRF保护等功能。
|
4天前
|
Java 大数据 云计算
Spring框架:Java后台开发的核心
【4月更文挑战第15天】Spring框架在Java后台开发中占据核心位置,因其控制反转(IoC)、面向切面编程(AOP)、事务管理等特性提升效率和质量。Spring提供数据访问集成、RESTful Web服务和WebSocket支持。优势包括高效开发、灵活扩展、强大生态圈和广泛应用。应用于企业级应用、微服务架构及云计算大数据场景。掌握Spring对Java开发者至关重要。
|
7天前
|
数据采集 前端开发 Java
数据塑造:Spring MVC中@ModelAttribute的高级数据预处理技巧
数据塑造:Spring MVC中@ModelAttribute的高级数据预处理技巧
21 3
|
7天前
|
存储 前端开发 Java
会话锦囊:揭示Spring MVC如何巧妙使用@SessionAttributes
会话锦囊:揭示Spring MVC如何巧妙使用@SessionAttributes
13 1
|
7天前
|
前端开发 Java Spring
数据之桥:深入Spring MVC中传递数据给视图的实用指南
数据之桥:深入Spring MVC中传递数据给视图的实用指南
24 3
|
7天前
|
Java 应用服务中间件 Maven
使用IDEA搭建SpringMVC环境,Maven导入了依赖,但是运行报错 java.lang.ClassNotFoundException
使用IDEA搭建SpringMVC环境,Maven导入了依赖,但是运行报错 java.lang.ClassNotFoundException
8 1

热门文章

最新文章