1、Spring boot,Mybatis 启动报错 Failed to auto-configure a DataSource

    ***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class Action: Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).

  解决方法:

  注解这样写:@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})

2、非法反射,报错信息

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$ (file:/C:/Users/%e5%%b3%e6%%%e5%b3%b0/.m2/repository/org/springframework/spring-core/5.0..RELEASE/spring-core-5.0..RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

  警告信息,暂时没影响

3、idea运行springBoot项目报错 Process finished with exit code 0

  Deleting provided scope of spring-boot-starter-tomcat dependency helps me.

  在pom.xml中添加,然后导入

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>

4、alt + enter 导入类

  在使用idea开发java项目的时候,经常需要导入jdk或者是第三方类库的类,如果是自己手工导入的话,非常麻烦,效率很低,下面来介绍下如何设置idea,就可以实现自动导入

  设置自动导入的方式,来自动批量导入,打开idea的settings设置对话框

  在左上角的输入框中输入auto import关键字搜索,找到Editor>General>Auto Import

  勾选上add unambiguous imports on the fly选项,点击确认,关闭对话框

  在设置自动导入的窗口,还有一个Optimize imports on the fly选项,也可以勾选上,可以帮助我们自动去除不需要的导入类

创建spring boot项目启动报错遇到的问题的更多相关文章

  1. spring boot项目启动报错

    在eclipse中运行没有任何问题,项目挪到idea之后就报错 Unable to start EmbeddedWebApplicationContext due to miss EmbeddedSe ...

  2. spring boot项目启动报DataSource错误

    初建一个简单的spring boot 项目,启动后会报错. Exception encountered during context initialization - cancelling refre ...

  3. Spring boot&Mybatis 启动报错 Failed to auto-configure a DataSource

    *************************** APPLICATION FAILED TO START *************************** Description: Fai ...

  4. spring boot项目启动报(No session repository could be auto-configured, check your configuration (session store type is 'null'))

    找到项目的application配置文件,增加 spring.session.store-type=none,重新启动问题解决 注:因为项目未使用redis管理session,可以如上设置,如果想使用 ...

  5. spring+mybatis项目启动报错Initializing Spring root WebApplicationContext

    这个问题很怪异,各种各样的情况都会导致这个问题的出现,主要是由于sping加载读取配置文件的时候出了问题.我在处理mybatis的时候出现了这个问题,后来排查发现,在mybatis的配置文件中如果有大 ...

  6. 使用IDEA创建Spring boot项目,继承mybaits。并进行简单的数据库查询操作

    本文讲的是使用IEDA创建Spring boot项目,对于环境安装需要自行准备,如JDK1.8.Maven 3.3.IDEA编译器.Mysql5.7等需事前准备好. 1.创建Spring boot项目 ...

  7. 让Spring Boot项目启动时可以根据自定义配置决定初始化哪些Bean

    让Spring Boot项目启动时可以根据自定义配置决定初始化哪些Bean 问题描述 实现思路 思路一 [不符合要求] 思路二[满足要求] 思路三[未试验] 问题描述 目前我工作环境下,后端主要的框架 ...

  8. spring boot 项目启动无任何反应

    遇到的问题 spring boot项目启动后无任何报错,ps有进程,nohub无日志 定位 更换jar包,问题依然存在,将jar包放到其他服务器,运行正常,排除打包问题 同服务器其他系统运行正常,但停 ...

  9. 用spring tool suite插件创建spring boot项目时报An internal error occurred during: "Building UI model". com/google/common/

    本文为博主原创,未经允许不得转载 在用spring tool suite创建spring boot项目时,报一下异常: 查阅很多资料之后发现是因为装的spring tool suite的版本与ecli ...

随机推荐

  1. 详谈 Spring 中的 IOC 和 AOP

    这篇文章主要讲 Spring 中的几个点,Spring 中的 IOC,AOP,下一篇说说 Spring 中的事务操作,注解和 XML 配置. Spring 简介 Spring 是一个开源的轻量级的企业 ...

  2. 第二波分析:德国是2018世界杯夺冠最大热门? Python数据分析来揭开神秘面纱… (附源代码)

    2018年,世界杯小组赛已经在如火如荼的进行中.在上篇文章的基础上[2018世界杯:用Python分析热门夺冠球队],我们继续分析世界杯32强的实力情况,以期能够更进一步分析本次世界杯的夺冠热门球队. ...

  3. H5 video标签视频加载存在的问题

    客户发现上传的视频无法播放,然后主管让我解决这个问题,这个页面不是我负责的,我看了代码,发现视频用的h5标签video标签加载视频.我看了没问题,然后 我先用ie浏览器打开,视频加载没问题.然后我给主 ...

  4. python中的super( test, self).__init__()

    python中的super( test, self).__init__() 对继承自父类的属性进行初始化 首先找到test的父类(比如是类A),然后把类test的对象self转换为类A的对象,然后“被 ...

  5. bzoj 4242 水壶 (多源最短路+最小生成树+启发式合并)

    4242: 水壶 Time Limit: 50 Sec  Memory Limit: 512 MBSubmit: 1028  Solved: 261[Submit][Status][Discuss] ...

  6. 汇编代码中db,dw,dd的区别

    db定义字节类型变量,一个字节数据占1个字节单元,读完一个,偏移量加1 dw定义字类型变量,一个字数据占2个字节单元,读完一个,偏移量加2 dd定义双字类型变量,一个双字数据占4个字节单元,读完一个, ...

  7. bzoj 3996 最小割

    公式推出来后想了半天没思路,居然A是01矩阵..... 如果一个问题是求最值,并那么尝试先将所有可能收益加起来,然后矛盾部分能否用最小割表达(本题有两个矛盾,第一个是选还是不选,第二个是i,j有一个不 ...

  8. python开发_xml.dom_解析XML文档_完整版_博主推荐

    在阅读之前,你需要了解一些xml.dom的一些理论知识,在这里你可以对xml.dom有一定的了解,如果你阅读完之后. 下面是我做的demo 运行效果: 解析的XML文件位置:c:\\test\\hon ...

  9. Codeforces Round #281 (Div. 2) D. Vasya and Chess 镜面对称 博弈论

    D. Vasya and Chess time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  10. QCon大会上推荐阅读的10本书

    QCon北京2014大会将于4月25-27日在北京国际会议中心盛大开幕.QCon是由@InfoQ 主办的全球顶级技术盛会.在此次盛会中,现场将有@人民邮电出版社-信息技术分社 主办的现场扫描二维码赠书 ...