springboot
bug永动机
一桶水,一条烟,一个bug改几天
展开
-
springboot上下文路径配置问题
在springboot1.5.9版本上,上下文配置需要下边的语句server.context-path=/demo(上下文所需要添加的路径名)在springboot2.2.1版本中,改成了下边这个,否则会报错server.servlet.context-path=/demo...原创 2019-12-02 09:53:13 · 3536 阅读 · 1 评论 -
mybatis-generator.xml报错
嗯嗯。。。。。。。。。。。。。如果想看我改bug的苦逼经历,请坚持看完,坚持不下去就直接看最后吧org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘app’: Unsatisfied dependency expressed through field ‘...原创 2019-11-20 16:31:43 · 438 阅读 · 1 评论 -
mybatis-generator.xml为文件
在pom文件里添加<!--mybatis自动生成文件的插件--> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId&...原创 2019-11-19 15:13:00 · 143 阅读 · 0 评论 -
maven启动报错
异常1:[ERROR] Failed to execute goal on project biz_zhuhai: Could not resolve dependencies for project biz_zhuhai:biz_zhuhai:jar:0.0.1-SNAPSHOT: Failed to collect dependencies for [com.maywide.ibh:lib3...转载 2019-11-19 14:57:24 · 399 阅读 · 0 评论 -
mybatis-generator文件运行报错
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate (default-cli) on project miaosha: configfile D:\idea\Student\miaosha\src\main\resources\mybatis-gener...原创 2019-11-19 14:50:26 · 1049 阅读 · 0 评论 -
@EnableAutoConfiguration注解的作用
(以下解释仅供本人自己理解,如果有错误,请指教。具体的原理请看这边https://blog.csdn.net/u013272625/article/details/92650857)@EnableAutoConfiguration注解在使用时的原理:一是收集所有spring.factories中EnableAutoConfiguration相关bean的类,初始化为一个相关的bean;二是将...原创 2019-11-19 10:14:32 · 5182 阅读 · 0 评论 -
@RequestParam注解使用
1、作用:@RequestParam:将请求参数绑定到你控制器的方法参数上(是springmvc中接收普通参数的注解)2、语法:语法:@RequestParam(value=”参数名”,required=”true/false”,defaultValue=””) value:参数名 required:是否包含该参数,默认为true,表示该请求路径中必须包含该参数,如果不包含就报错。...转载 2019-11-07 15:38:34 · 213 阅读 · 0 评论 -
springboot插入值报错
解决方案:这个是主键自增长策略问题。将ID生成略组改成@GeneratedValue(strategy = GenerationType.IDENTITY).关于主键策略@GeneratedValue:主键的产生策略,通过strategy属性指定。主键产生策略通过GenerationType来指定。GenerationType是一个枚举,它定义了主键产生策略的类型。1、AUTO自动选择...转载 2019-10-11 14:11:19 · 263 阅读 · 0 评论 -
springboot中取出数据库的值报错
springboot启动时报下边的错误org.hibernate.LazyInitializationException: could not initialize proxy - no Session简单理解为没有session,也就是说session没有打开,已经关闭了。在实体类上加入@Proxy(lazy=false)这个注解就行了从字面上的意思就是hibernate进行懒加载时报错...原创 2019-10-11 13:59:48 · 244 阅读 · 0 评论 -
springboot启动报错
启动时报错,启动失败Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true在yml加上springmain:allow-bean-definition-overriding: true #当遇到同样名字的时候...原创 2019-10-11 13:37:51 · 247 阅读 · 0 评论 -
自己常用的pom文件包
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apach...原创 2019-10-11 13:25:00 · 490 阅读 · 0 评论 -
mysql菜鸟教程
分享一个很全的MySQL的菜鸟教程https://www.runoob.com/mysql/mysql-tutorial.html点击这个链接原创 2019-10-04 12:44:44 · 5225 阅读 · 2 评论 -
springboot中自己常用的application.properties的配置和application.yml的配置
##springboot中application.properties相关的基础配置#端口配置#server.port=8080spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driverspring.datasource.url=jdbc:mysql://localhost:3306/blog1(数据库名称)?charset=u...原创 2019-10-03 20:18:51 · 865 阅读 · 0 评论