12.13工作学习记录 Feign远程调用 微信公众号 封装与排序 Spring源码解析 ctrl+alt+U可以看类图 ctrl+alt+单击可以跳实现类

可以在activity模块调用user的功能

关于feign  

@FeignClient(value = "service-user")
public interface UserInfoFeignClient {
    @GetMapping("/admin/user/userInfo/inner/getById/{id}") 需要完整路径
    public UserInfo getById(@PathVariable Long id);
}

需要加注解:

@EnableFeignClients(basePackages = "com.atguigu" 

字符串判空:

if(!StringUtils.isEmpty(couponStatus))

关于优惠劵封装用户信息  

couponUseList.stream().forEach(item->{
    this.getUserInfoBycouponUse(item);
});

微信公众号    后台管理系统是给管理员用的  微信公众号是用h5来做

什么是微信公众号? 线上线下微信互动营销方式

对parentId做判断   List<Menu> oneMenuList = menuList.stream().filter(menu -> menu.getParentId().longValue() == 0).collect(Collectors.toList());

关于封装与排序:

  for(Menu oneMenu : oneMenuList) {
            MenuVo oneMenuVo = new MenuVo();
            BeanUtils.copyProperties(oneMenu, oneMenuVo);

            List<Menu> twoMenuList = menuList.stream()
                    .filter(menu -> menu.getParentId().longValue() == oneMenu.getId())
                    .sorted(Comparator.comparing(Menu::getSort))
                    .collect(Collectors.toList());            筛选出所属的子集   并做一个排序

            List<MenuVo> children = new ArrayList<>();
            for(Menu twoMenu : twoMenuList) {
                MenuVo twoMenuVo = new MenuVo();
                BeanUtils.copyProperties(twoMenu, twoMenuVo);
                children.add(twoMenuVo);
            }

Spring   

BeanFactory     ApplicationContext 后者的功能更多

MessageSource: 国际化功能,支持多种语言
ResourcePatternResolver: 通配符匹配资源路径
EnvironmentCapable: 环境信息,系统环境变量,*.properties、*.application.yml等配置文件中的值
ApplicationEventPublisher: 发布事件对象

BeanFactory实际上是ApplicationContext的一个父接口  其实BeanFactory 才是Spring的核心容器   前者组合了后者的功能

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值