javaee一些问题点基础记录

hibernate
映射策略
一、nosql
  1. mongdb入门
  2. MongoDB 之 aggregate $lookup
  • javaee
    classpath 和 classpath* 区别、
    不再resources目录中 classpath:你的目录/eheache.xml
    2)数字类型值太大:如 id自增太大,前端接受后精度丢失
    1325041912076988419 主键自增,mybatis 查询空
    @JsonSerialize(using = ToStringSerializer.class) 转出字符串避免精度丢失
    3) 富文本 传入后台与后台接收
    前端通过encodeURIComponent()或者encodeURI()转码后再传
    encodeURIComponent java.net.URLDecoder.decode(works, “UTF-8”);
    4) OPTIONS请求时设置了Header请求和token可是后台接收不到
    拦截器增加

    拦截器增加:
if (httpServletRequest.getMethod().equals("OPTIONS")) {
   
    httpServletResponse.setStatus(HttpServletResponse.SC_OK);
    return true;
}

5) 同一个工程同一个包路径的同一个class不能强转
同一个class在进行集合、遍历等计算时,提示该class不能转换成该class
原因:热加载
可能猜测:多个不同的热加载器?
6)stream

List<Student> projectTypeList= new ArrayList();
Long[] tempIds = projectTypeList.stream().map(ProjectType :: getId).toArray(Long[]::new);
Long[] tempIds =new Long[2];
Long[] tyIds = Stream.concat(Stream.of(tyIds), Stream.of(tempIds)).toArray(Long[]::new);
二、 springmvc

1)
Controller 前置控制器的 3 种实现方式,1)@controller 2)接口controller 3) 接口HttpRequestHandler
2)
model 没有 没有提供get set 方法 导致 返回json只有一个属性 其它丢掉了

关于 OOA→OOD→OOP

三、权限

spring security

  • springBoot
  1. @EnableAutoConfiguration(exclude 过时
    2.x后改为yml配置 spring.application.autoconfigure.exclude
    2)
    spring boot中配置多个DispatcherServlet
  • mybatis-plus springboot整合
    找不到BaseMapper中的crud方法,配置MappperScan无效。在排除了pom存在的大量jar冲突,将boot升级到2.3.3,再将冲突jar排除、升级相关依赖jar之后,再次整合成功
  • 排除 日志多个 binding绑定,boot项目引入了boot-web包含了slf4j ,删掉.排除掉其它所有日志依赖引入
  • hutool 找不到log4j
    在db.setting 设置了filter 日志用 log4j在com.alibaba.druid.pool.DruidDataSource#configFromPropety 264行设置时报错。再往后追就是com.alibaba.druid.filter.FilterManager#loadFilter
  • springboot默认用的是slf4j 包含在boot-web中,其它额外引入的日志jar可以直接删除
五、 版本管理一些记录
六、 linux

chkconfig --list
查看 系统启动服务列表
或者 systemctl list-unit-files
查看 乌班图 或者 red hat版本
cat /proc/version
在这里插入图片描述
a、
nacos安装 win版
b、
centos7下/etc/sysconfig/目录没有iptables问题
c、
erlang: wx-config: command not found或wxWidgets must be installed on your system.
b、
rpm安装 成功
经历步骤:
mysql linux 官网下载路径
linux安装5.5版本mysql_spring20l6的博客-CSDN博客_linux安装mysq
No such file or directory
Neither host ‘localhost.localdomain’ nor ‘localhost’ could be looked up with
./bin/resolveip
Please configure the ‘hostname’ command to return a correct
hostname.
If you want to solve this
CentOS7修改主机名的三种方法
修改主机名
修改后无效 : 64位 安装成 32位 导致的
Unit mysqld.service could not be found.
修改后 启动命令为 service mysqld start
Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
其它源码安装博客
systemctl enable mysqld.service
启用服务

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值