Spring Boot项目在Mac下使用Maven启动时碰到的神奇问题:Unregistering JMX-exposed beans on shutdown
错误如下:
➜ springboottest1 mvn spring-boot:run
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building springboottest1 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.4.7.RELEASE:run (default-cli) > test-compile @ springboottest1 >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ springboottest1 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/Jim/Desktop/springboottest1/src/main/resources
[INFO] skip non existing resourceDirectory /Users/Jim/Desktop/springboottest1/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ springboottest1 ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /Users/Jim/Desktop/springboottest1/target/classes
[WARNING] 读取/Users/Jim/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.15/tomcat-embed-core-8.5.15.jar时出错; invalid LOC header (bad signature)
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ springboottest1 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/Jim/Desktop/springboottest1/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ springboottest1 ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/Jim/Desktop/springboottest1/target/test-classes
[WARNING] 读取/Users/Jim/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.15/tomcat-embed-core-8.5.15.jar时出错; invalid LOC header (bad signature)
[INFO]
[INFO] <<< spring-boot-maven-plugin:1.4.7.RELEASE:run (default-cli) < test-compile @ springboottest1 <<<
[INFO]
[INFO] --- spring-boot-maven-plugin:1.4.7.RELEASE:run (default-cli) @ springboottest1 --- . ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.7.RELEASE) 2017-08-17 15:50:23.713 INFO 2562 --- [ main] c.j.springboottest.springboottest1.App : Starting App on JimdeMacBook-Pro.local with PID 2562 (/Users/Jim/Desktop/springboottest1/target/classes started by Jim in /Users/Jim/Desktop/springboottest1)
2017-08-17 15:50:23.716 INFO 2562 --- [ main] c.j.springboottest.springboottest1.App : No active profile set, falling back to default profiles: default
2017-08-17 15:50:23.777 INFO 2562 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@220b740b: startup date [Thu Aug 17 15:50:23 CST 2017]; root of context hierarchy
2017-08-17 15:50:25.248 INFO 2562 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-08-17 15:50:25.267 INFO 2562 --- [ main] c.j.springboottest.springboottest1.App : Started App in 12.251 seconds (JVM running for 16.751)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.357 s
[INFO] Finished at: 2017-08-17T15:50:25+08:00
[INFO] Final Memory: 30M/379M
[INFO] ------------------------------------------------------------------------
2017-08-17 15:50:25.494 INFO 2562 --- [ Thread-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@220b740b: startup date [Thu Aug 17 15:50:23 CST 2017]; root of context hierarchy
2017-08-17 15:50:25.496 INFO 2562 --- [ Thread-1] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
从上面的问题可以看出,是tomcat的Jar包读取失败,那么解决方法时进入到本地仓库把这个目录下的全部包删除,然后再重新构建即可解决。
总结:
一般使用Maven做依赖时,会碰到很多莫名其妙的问题,或许删除本地库的包再重新下载一次也是一种解决方法,尤其对于那种正确配置之后的项目不能运行的情况。
Spring Boot项目在Mac下使用Maven启动时碰到的神奇问题:Unregistering JMX-exposed beans on shutdown的更多相关文章
- 多个Spring Boot项目部署在一个Tomcat容器无法启动
转自https://www.cnblogs.com/tomxin7/p/9434085.html 业务介绍 最近用Spring Boot开发了一个翻译的小项目,但是服务器上还跑着其他项目,包括一个同样 ...
- Spring Boot 项目实战(一)Maven 多模块项目搭建
一.前言 最近公司项目准备开始重构,框架选定为 Spring Boot ,本篇主要记录了在 IDEA 中搭建 Spring Boot Maven 多模块项目的过程. 二.软件及硬件环境 macOS S ...
- spring boot 项目从配置文件中读取maven 的pom.xml 文件标签的内容。
需求: 将pom.xml 文件中的版本号读取到配置文件并打印到日志中. 第一步: 在pom.xml 中添加以下标签. 第二步: 将version 标签的值读取到配置文件中 这里使用 @@ 而不是 ...
- 【spring cloud】子模块module -->导入一个新的spring boot项目作为spring cloud的一个子模块微服务,怎么做/或者 每次导入一个新的spring boot项目,IDEA不识别子module,启动类无法启动/右下角没有蓝色图标
如题:导入一个新的spring boot项目作为spring cloud的一个子模块微服务,怎么做 或者说每次导入一个新的spring boot项目,IDEA不识别,启动类无法启动,怎么解决 下面分别 ...
- Spring Boot 项目实战(五)集成 Dubbo
一.前言 上篇介绍了 Redis 的集成过程,可用于解决热点数据访问的性能问题.随着业务复杂度的提高,单体应用越来越庞大,就好比一个类的代码行数越来越多,分而治之,切成多个类应该是更好的解决方法,所以 ...
- spring boot学习01【搭建环境、创建第一个spring boot项目】
1.给eclipse安装spring boot插件 Eclipse中安装Spring工具套件(STS): Help -> Eclipse Marketplace... 在Search标签或者Po ...
- Spring Boot 项目集成 Alibaba Druid
Druid 是一个非常好用的数据库连接池,但是他的好并不止体现在作为一个连接池加快数据访问性能上和连接管理上,他带有一个强大的监控工具:Druid Monitor.不仅可以监控数据源和慢查询,还可以监 ...
- Myeclipse下使用Maven搭建spring boot项目
开发环境:Myeclipse2017.JDK1.6.Tomcat 8.0.Myeclipse下使用Maven搭建spring boot项目,详细过程如下: 1. New -> Project.. ...
- Myeclipse下使用Maven搭建spring boot项目(第二篇)
现在需要搭建spring boot框架,并实现一个HelloWorld的项目,让程序真正运行起来. 一.在pom.xml中引入spring-boot-start-parent,spring官方的叫st ...
随机推荐
- [NOIP 2016] 蚯蚓
[题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=4721 [算法] 首先,我们可以维护一个堆,堆中存放蚯蚓的长度,由于除当前蚯蚓其他的蚯 ...
- Grafana+Zabbix+Prometheus 监控系统
环境说明 软件 版本 操作系统 IP地址 Grafana 5.4.3-1 Centos7.5 192.168.18.231 Prometheus 2.6.1 Centos7.5 192.168.18. ...
- LeetCode刷题 1. Two Sum 两数之和 详解 C++语言实现 java语言实现
1. Two Sum 两数之和 Given an array of integers, return indices of the two numbers such that they add up ...
- CALayer帧动画
CALayer帧动画 _sunLayer = [[CALayer alloc]init]; _sunLayer.contents = (id)[UIImage imageNamed:@"su ...
- SnackDown Online Pre-elimination round A
1. 应该n是偶数,就行吧.应该判断1个人,只能出现一次吧. #include<bits/stdc++.h> #define pb push_back typedef long long ...
- Oracle快速收集AWR的方案
记一种方便的awr收集方法,该脚本可以按小时收集目标时段的awr 素材:awr_generate.sql(具体脚本内容请见本文末尾) (1)将awr_generate.sql置于数据库服务器本地路径, ...
- eclipse中server 没有tomcat选项
eclipse集成Tomcat: 打开eclipse - 窗口 - 首选项 - 服务器 - 运行时环境 找到Tomcat然后添加. eclipse添加插件: 开发WEB项目时要集成Tomcat可以并不 ...
- Eclipse安装配置——For Java
1.下载安装JRE 2.下载Eclipse,解压到相应文件夹 3.配置Eclipse 3.1 配置字体大小 -12号 3.2配置workspace默认编码,utf-8,默认系统windows 3.3 ...
- div 背景放图和直接放图区别
<html> <head> <meta charset="UTF-8"> <title></title> <sty ...
- 【Oracle】rollup函数
当我们在做报表统计的时候,很多时候需要用到‘合计’这个功能,比如我们想得到如下格式的报表: 这张表是按照deptno分组,然后按照deptno分组合计.rollup函数可以完美的解决这个问题. 1.建 ...