• 前端向后端传值:

    • Button 和form

      • 1
        2
        3
        4
        5
        6
        7
        function goUpdatePage(id) {
        window.location.href = "${pageContext.request.contextPath}/user/editcontroller?id=" + id;
        }
        <button type="button" onclick="goUpdatePage(${user.id})"
        class="btn btn-primary btn-xs">
        <i
        class=" glyphicon glyphicon-pencil"></i></button>
  • 开发中service层 必须要写 @service注解

  • ⚠️service中不要加@service。在service的实现serviceiml中加@service注解

  • 开发的顺序 从前端传值到Controller 再到 service 再到serviceimpl 再到userdao 再到mybatis.xml再到数据库 数据库返回前端页面

  • 引入mybatis 的多个mapper的配置文件 mapper.xml Spring Boot 的方式

    1
    2

    mybatis.mapper-locations=classpath:mybatis/mapper/*.xml
  • ###idea警告:Field injection is not recommended

  • ####Springboot开发 Dao中UserDao RoleDao中要加 @Mapper注解

    #

  • ![屏幕快照 2018-11-14 下午1.19.50](/Users/apple/Desktop/屏幕快照 2018-11-14 下午1.19.50.png)

  • import和open项目是不一样的 出现上面的情况要import一下啊 兄ide

  • Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘BaseResultMap’

  • Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Ca

    看到那个resultType了么,就是它惹的祸,这里把resultType改为resultMap就OK啦,重启tomcat,木有异常啦

image-20181114135152950

跳转视图 用字符串哈

image-20181117115951176

开发中前端的img要放到和框架的同一目录及下面哈。兄die


1
Connection connection = ConnectionUtils.getConnection();

用类.方法().var 可以直接返回该对象的返回对象

Sting s=”test”

1
System.out.println(s);===s.sout

![image-20190131103713601](../../../../Users/apple/Library/Application Support/typora-user-images/image-20190131103713601.png)


时间问题

image-20190209160806502

https://blog.csdn.net/qq_34160679/article/details/80651027

1
jdbc.url     = jdbc:mysql:/xxx:3306/zhongfubang?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai

Linux 无法使用命令

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

修改/etc/profile文件,配置maven环境变量时候出问题了,忘记加了 $PATH: 然后source /etc/profile 接下来就是 ll,ls,vim命令都用不了。。。害的我以为xshell我更新了呢,卸载重装了还是没用。

img

解决办法如下图,执行这两条命令:

img

1
2
3
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

vim /etc/profile

SpringBoot 主类报错

image-20190302154936111

1
在idea中使用终端 然后使用mvn install命令。删掉有问题的jar包重新下载。 解决问题

Idea相关

1
装一个lombok插件才会有get set方法
1
2
3
4
MybatisPluginCodes插件
findBy...
看文档 卸载其他相关插件
commond+1 创建SQl语句

self4j log4j的问题

1
ggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation

image-20190313123221966

1
2
3
4
5
6
7
8
9
10
11
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
---------------------

Springboot 依赖冲突

image-20190313141644871


Maven logs遇到错误 重启Idea 或者关机重启电脑


image-20190315181918906


SpringBoot +Mybatis 整合问题:

image-20190315184317660

使用Yml 添加mapperxml

image-20190315184344150


1
2
3
4
5
@RequestMapping("/{id}")
@ResponseBody
public Mydb01 list(@PathVariable("id") Integer id) {//@PathVariable("id") id是不是一定要写
return userService.selectByPrimaryKey(id);
}

image-20190315184418672


maven pom 文件

image-20190422100555253


image-20190422100619170


image-20190422100653173


Idea Debug没用

屏幕快照 2019-08-18 下午3.31.14

一般 情况都是 断点问题 查询断点问题 百度

https://www.cnblogs.com/han-1034683568/p/8603588.html


关于dubbo的问题

1 版本问题

2 可能是端口问题。⭐️⭐️

3 可能是 zookeeper问题

4 可能是dubbo admin 。。。

或者是dubbi d端口问题


image-20190925185940070


General 改变单词错误信息