1.Closing JPA EntityManagerFactory for persistence unit 'default'错误导致springboot启动后终止

------------------->

2019-01-22 17:18:34.941  INFO 42978 --- [      Thread-13] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2019-01-22 17:18:34.945 INFO 42978 --- [ Thread-13] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2019-01-22 17:18:35.181 INFO 42978 --- [ Thread-13] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
解决办法

在依赖中添加spring-boot-starter-web

例如Gradle在build.gradle中添加

implementation 'org.springframework.boot:spring-boot-starter-web'

问题解决

<------------------- 2019.1.22

2.Gradle加载依赖很慢,换成国内源

--------------->

repositories {
//使用国内源下载依赖
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
mavenCentral()
}

替换之后重新Gradle下

<----------------2019-01-23

3.Gradle加载出错,错误如下

startup failed:
build file '/Users/cuifuan/workspaces/springcloud-tools/tools-eureka/build.gradle': 4: all buildscript {} blocks must appear before any plugins {} blocks in the script See https://docs.gradle.org/5.0/userguide/plugins.html#sec:plugins_block for information on the plugins {} block @ line 4, column 1.
buildscript {
^ 1 error Open File

经过一番排查

//删去下面代码,如果存在,我也不知道为什么
plugins {
id 'java'
}

4.feign依赖不存在

feign 声明式调用

Feign makes writing java http clients easier

之前安装依赖

dependencies{
compile "org.springframework.cloud:spring-cloud-starter-feign"
compile "org.springframework.cloud:spring-cloud-starter-eureka"
}

springboot2.0之后

dependencies {
implementation "org.springframework.cloud:spring-cloud-starter-openfeign"
implementation 'org.springframework.cloud:spring-cloud-starter-eureka-server'
}

5. com.netflix.client.ClientException: Load balancer does not have available server for client: sp

build.gradle

dependencies {
implementation "org.springframework.cloud:spring-cloud-starter-openfeign"
//应是eureka-client
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
}

6.解决报错 javax.persistence.TransactionRequiredException: Executing an update/delete query

运行报错原因:少了一个注解:@Transactional : 要求开启事物管理

SpringBoot踩坑日记的更多相关文章

  1. AI相关 TensorFlow -卷积神经网络 踩坑日记之一

    上次写完粗浅的BP算法 介绍 本来应该继续把 卷积神经网络算法写一下的 但是最近一直在踩 TensorFlow的坑.所以就先跳过算法介绍直接来应用场景,原谅我吧. TensorFlow 介绍 TF是g ...

  2. 人工智能(AI)库TensorFlow 踩坑日记之一

    上次写完粗浅的BP算法 介绍 本来应该继续把 卷积神经网络算法写一下的 但是最近一直在踩 TensorFlow的坑.所以就先跳过算法介绍直接来应用场景,原谅我吧. TensorFlow 介绍 TF是g ...

  3. hexo博客谷歌百度收录踩坑日记

    title: hexo博客谷歌百度收录踩坑日记 toc: false date: 2018-04-17 00:09:38 百度收录文件验证 无论怎么把渲染关掉或者render_skip都说我的格式错误 ...

  4. Hexo搭建静态博客踩坑日记(二)

    前言 Hexo搭建静态博客踩坑日记(一), 我们说到利用Hexo快速搭建静态博客. 这节我们就来说一下主题的问题与主题的基本修改操作. 起步 chrome github hexo git node.j ...

  5. Hexo搭建静态博客踩坑日记(一)

    前言 博客折腾一次就好, 找一个适合自己的博客平台, 专注于内容进行提升. 方式一: 自己买服务器, 域名, 写前端, 后端(前后分离最折腾, 不分离还好一点)... 方式二: 利用Hexo, Hug ...

  6. JavaScript 新手的踩坑日记

    引语 在1995年5月,Eich 大神在10天内就写出了第一个脚本语言的版本,JavaScript 的第一个代号是 Mocha,Marc Andreesen 起的这个名字.由于商标问题以及很多产品已经 ...

  7. React Native Android配置部署踩坑日记

    万事开头难 作为一只进入ECMAScript世界不久的菜鸟,已经被React Native的名气惊到了,开源一周数万星勾起了我浓烈的兴趣.新年新气象,来个HellWorld压压惊吧^_^(故意少打个' ...

  8. 人工智能(AI)库TensorFlow 踩坑日记之二

    上次 踩坑日志之一 遗留的问题终于解决了,所以作者(也就是我)终于有脸出来写第二篇了. 首先还是贴上 卷积算法的示例代码地址 :https://github.com/tensorflow/models ...

  9. 微信小程序开发踩坑日记

    2017.12.29  踩坑记录 引用图片名称不要使用中文,尽量使用中文命名,IDE中图片显示无异样,手机上图片可能出现不显示的情况. 2018.1.5  踩坑记录 微信小程序设置元素满屏,横向直接w ...

随机推荐

  1. 【Linux常见命令】rm命令

    rm - remove files or directories rm命令用于删除一个文件或者目录. 语法: rm [OPTION]... FILE... 参数: -f 强制删除文件 -r 递归,用于 ...

  2. SaltStack的数据系统

    一.SaltStack数据系统的分类 1.Grains(收集的是静态数据) 官方使用文档:https://www.unixhot.com/docs/saltstack/topics/targeting ...

  3. json序列化字符串后,配置枚举类型显示数值而不是名称

    2019独角兽企业重金招聘Python工程师标准>>> 经常有这么一个需求,实体类里面用到枚举常量,但序列化成json字符串时.默认并不是我想要的值,而是名称,如下 类 @Data ...

  4. 使用cpplint检测代码规范

    0. cpplint - python脚本, google使用它作为自己的C++代码规范检查工具: 1. 安装 方法一: $sudo apt-get install python-pip $pip i ...

  5. 瑞幸咖啡还是星巴克,一杯下午茶让我明白 设计模式--模板方法模式(Template Method Pattern)

    简介 Define the skeleton of an algorithm in an operation,deferring some steps to subclasses.Template M ...

  6. Java——字符串操作

    /** * java字符串操作 * @author wydream * */ public class StringTest { public static void main(String[] ar ...

  7. Git 获取远程仓库指定分支内容

    1. 在本地一个空的文件夹中 git init  (生成本地仓库) 2. 在刚刚的文件夹中随便建立一个文件 ,git add . (为了生成分支)(提交到暂存区) 3. git commit -m'1 ...

  8. 使用 if elseif else 指定条件

    nrows = 4; ncols = 6; A = ones(nrows,ncols); 遍历矩阵并为每个元素指定一个新值.对主对角线赋值 2,对相邻对角线赋值 -1,对其他位置赋值 0. for c ...

  9. Mahout聚类和kafaka相关知识

    1.说几种距离测度Mahout: 欧式距离测度:平方欧式距离测度:曼哈顿距离测度:余弦距离测度:加权距离测度 2.K-means算法参数:

  10. 201771030115-牛莉梅 实验一 软件工程准备-<初学《构建之法--现代软件工程》的疑问>

    项目 内容 课程班级博客链接 https://edu.cnblogs.com/campus/xbsf/nwnu2020SE 这个作业要求链接 https://www.cnblogs.com/nwnu- ...