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. CSS开发技巧(一):button样式设置

    button样式需要注意的有几点: 1.建议有一个最小宽度,以免在文字很少时使得按钮过于窄,宽高不协调: 2.建议有一个padding,以免内部文本显得过于拥挤: 2.hover时需要有颜色变化,以告 ...

  2. tr标签使用hover的box-shadow效果不生效

    先说问题: 这是大致的HTML结构 <table cellpadding="0" cellspacing="0"> <thead> &l ...

  3. js中的filter

    filter是常说的增删改查中的'查',当对一个数组进行筛选时,经常会使用indexOf 和es6中的includes()方法.filter是es5中的一种迭代方法,其定义为:对数组中的每一项运行给定 ...

  4. 图像处理之OpenCV - 缩放/旋转/裁剪/加噪声/高斯模糊

    Github地址 @ 缩放 void cv::resize ( InputArray src, OutputArray dst, Size dsize, , , int interpolation = ...

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

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

  6. 2019 Multi-University Training Contest 10 I Block Breaker

    Problem Description Given a rectangle frame of size n×m. Initially, the frame is strewn with n×m squ ...

  7. python(写入 excel 操作 xlwt 模块)

    一.安装 xlwt 模块 pip install xlwt 二.excel 写入操作 这种方式只能新增或者覆盖文件写入 import xlwt # 创建一个workbook 设置编码 workbook ...

  8. python(简介)

    python发展史: 自从20世纪90年代初Python语言诞生至今,它已被逐渐广泛应用于系统管理任务的处理和Web编程. Python的创始人为荷兰人吉多·范罗苏姆 [3]  (Guido van ...

  9. RobotFrameWork 自动化环境搭建(基于 python2.7)

    1.自动化工具安装顺序 robot Framework(两个RF框架) WXpython(不要更改安装路径,自动安装在python文件中) 安装依赖库 RF3.0 和 RF1.5.2.1 打开 rid ...

  10. libevent(五)使用例子

    客户端: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/t ...