1、异常:Error resolving template "xxx", template might not exist or might not be accessible...解决办法

解决办法:在报出这个异常的方法上添加注解@ResponseBody

加上 @ResponseBody 后,会直接返回 json 数据

2、Field xxMapper in XXXXXX requried a bean of type ‘XXXMapper’ that could not be found ...解决办法

@Component
public interface XXXDepMapper{
@InsertProvider(...)
int insertXXX(....);
}

解决办法:springboot和mybatis整合中,组件需要在配置中设置@MapperScan扫描包

@Confuguration
@EnableTransactionManagement
@MapperScab(vasePackages={"xxxxx.mapper"},sqlSessionFactoryRef="")
public class PostgressConfiguraction{
....
}

3、server.servlet-path:应用上下文路径,项目路径是构成url地址的一部分

  springboot版本更新后从server.context-path改成了server.servlet-path

spring boot异常积累的更多相关文章

  1. spring boot 异常(exception)处理

    Spring Boot 集成教程 Spring Boot 介绍 Spring Boot 开发环境搭建(Eclipse) Spring Boot Hello World (restful接口)例子 sp ...

  2. 启动spring boot 异常

    再我搭建spring boot工程后,run application的时候抛出下面异常 Exception /slf4j-log4j12-.jar). If you are using WebLogi ...

  3. spring boot 异常汇总

    spring boot JPA 异常: org.springframework.data.mapping.PropertyReferenceException: No property role fo ...

  4. Spring boot异常统一处理方法:@ControllerAdvice注解的使用、全局异常捕获、自定义异常捕获

    一.全局异常 1.首先创建异常处理包和类 2.使用@ControllerAdvice注解,全局捕获异常类,只要作用在@RequestMapping上,所有的异常都会被捕获 package com.ex ...

  5. Java异常机制,自定义异常以及spring boot异常设计方案

    异常机制: 异常概念 异常分类 异常的处理方法 自定义异常 springboot 的异常解决方案

  6. spring boot 登录注册 demo (四) -- 体验小结

    之前没有折腾过Spring,直接上来怼Spring Boot异常痛苦,参考着官网的guide(https://spring.io/guides)写了几个demo: spring boot 跑起来确是方 ...

  7. spring boot集成mybatis(1)

    Spring Boot 集成教程 Spring Boot 介绍 Spring Boot 开发环境搭建(Eclipse) Spring Boot Hello World (restful接口)例子 sp ...

  8. spring boot配置druid连接池连接mysql

    Spring Boot 集成教程 Spring Boot 介绍 Spring Boot 开发环境搭建(Eclipse) Spring Boot Hello World (restful接口)例子 sp ...

  9. spring boot 连接Mysql介绍

    Spring Boot 集成教程 Spring Boot 介绍 Spring Boot 开发环境搭建(Eclipse) Spring Boot Hello World (restful接口)例子 sp ...

随机推荐

  1. Linux 一 些常用的命令

    查看当前系统JAVA的安装路径: echo $JAVA_HOME: 查看内核版本: uname -a ubuntu的防火墙 关闭:ufw disable开启:ufw enable 卸载了 iptabl ...

  2. Laravel 服务容器,IoC,DI

    DI DI 就是常说的依赖注入,那么究竟什么是依赖注入呢? 打个比方,电脑(非笔记本哈)需要键盘和鼠标我们才能进行操作,这个‘需要’换句话说就是‘依赖’键盘和鼠标. 那么,相应的,一个类需要另一个类才 ...

  3. 题解 P4692 【[Ynoi2016]谁的梦】

    Ynoi 中少见的不卡常题呢....虽说有 50 个数据点... 果然还是道好题 noteskey 总之就是补集转化的思想,算出每种颜色选点的总方案减去不可行方案(就是不包含 该种颜色的点的区间选取方 ...

  4. .NET垃圾回收机制(一)

    垃圾收集器(GarbageCollection)是组成.Net平台一个很重要的部分,.NET垃圾回收机制降低了编程复杂度,使程序员不必分散精力去处理析构.不妨碍设计师进行系统抽象.减少了由于内存运用不 ...

  5. Flask开发微电影网站(八)

    1.后台管理之电影预告管理 1.1 定义电影预告表单 在app的admin目录的forms.py文件中,定义电影预告表单 # 预告表单 class PreviewForm(FlaskForm): ti ...

  6. linux命令进阶

    Though unconsciously,peple are indeed moving towards their destination.Slow as the progress seen fro ...

  7. 解决Apache配置虚拟主机时出现403错误的问题

    1.用文本编辑器打开Apache中的httpd.conf,搜索httpd-vhosts.conf,找到“#Include conf/extra/httpd-vhosts.conf”,并把“#”去掉,启 ...

  8. python的位置参数、默认参数、关键字参数、可变参数区别

    一.位置参数 调用函数时根据函数定义的参数位置来传递参数. #!/usr/bin/env python # coding=utf-8 def print_hello(name, sex): sex_d ...

  9. SonarLint 代码质量管理

    Below are the instructions of how to install and use SonarLint. Install SonarLint Extensions in VS20 ...

  10. CodeSmith Generator 7.0.2的激活流程

    学过三层的人应该认识CodeSmith Generator吧,今天我就跟大家一起探讨下CodeSmith Generator 7.0.2的激活,这最新版本破解的难度也是超越以往......具体看这篇日 ...