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 : 要求开启事物管理

最新文章

  1. @property中的copy.strong.weak总结
  2. wap,h5页面
  3. Normalize.css – 现代 Web 开发必备的 CSS resets
  4. Windows Azure Service Bus (1) 基础
  5. awk,perl,python的命令行参数处理
  6. c语言,strcat(),字符串拼接
  7. getting “fatal: not a git repository: &#39;.&#39;” when using post-update hook to execute &#39;git pull&#39; on another repo
  8. 使用PostMan进行API自动化测试
  9. leetCode(66)-Excel Sheet Column Title
  10. Linux特殊符号
  11. Javascript高级编程学习笔记(14)—— 引用类型(3)Date类型
  12. Workspace in use or cannot be created, choose a different one.错误的解决办法
  13. openssl基本原理 + 生成证书 + 使用实例
  14. string字符串js操作
  15. py库: jieba (中文词频统计) 、collections (字频统计)、WordCloud (词云)
  16. RabbitMQ.Net 应用(1)
  17. Android Studio连接真机调试
  18. sharepoint 2013 service pack 和 Hotfix 版本
  19. am335x PDK3.0 设置为单网口配置记录
  20. robot framework学习笔记之八—解决列表或者字典中文乱码问题

热门文章

  1. 【Linux常见命令】split命令
  2. Redis介绍及字符串操作
  3. eggjs解决跨域问题
  4. 云时代 • 新契机:2017届中国SaaS产业大会圆满落幕
  5. ELSE 技术周刊(2017.12.25期)
  6. Linux下进程的创建(system(); fork(); exec*())
  7. Linux环境下,MongoDB 3.6.10 的安装步骤,以及设置用户和密码,配置随处执行mongo命令启动客户端,以及所遇到的问题
  8. CF思维联系– Codeforces-988C Equal Sums (哈希)
  9. 第十届山东省赛L题Median(floyd传递闭包)+ poj1975 (昨晚的课程总结错了,什么就出度出度,那应该是叫讨论一个元素与其余的关系)
  10. 学习笔记之MySQL的使用