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. odoo打包下载

    view 视图中下载按钮的编辑 <record id="action_download_zip" model="ir.actions.server"> ...

  2. webstorm2018最新激活码license server

    2018.7.5最新激活码: license server:https://s.tuzhihao.com:666/ 以后持续更新....

  3. 【初识】KMP算法入门

    举个例子 模式串S:a s d a s d a s d f a s d 匹配串T:a s d a s d f 如果使用朴素匹配算法—— 1 2 3 4 5 6  8 9 a s d a s d a s ...

  4. [UVa10296]Jogging Trails

    题目大意: 中国邮递员问题. 给你一个无向带权连通图,求经过所有边并返回起点的最短路径. 思路: Edmonds-Johnson算法. 显然,当原图为欧拉图时,答案即为其欧拉回路的长度. 考虑原图不存 ...

  5. PYQT控件使用

    QtGui.QComboBox .addItem(string)#添加字符串项到Item.addItems(list)#添加列表或元组元素到Item.clear()#清除所有Item.clearEdi ...

  6. BZOJ 4419: [Shoi2013]发微博 set模拟

    4419: [Shoi2013]发微博 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=4419 Description 刚开通的SH微博共 ...

  7. 监听当点击微信等app的返回按钮或者浏览器的上一页或后退按钮的事件

    在实际的应用中,我们常常需要实现在移动app和浏览器中点击返回.后退.上一页等按钮实现自己的关闭页面.调整到指定页面或执行一些其它操作的 需求,那在代码中怎样监听当点击微信.支付宝.百度糯米.百度钱包 ...

  8. Linux性能监控分析命令(四)—top命令介绍

    性能监控分析的命令包括如下: 1.vmstat 2.sar 3.iostat 4.top 5.free 6.uptime 7.netstat 8.ps 9.strace 10.lsof ======= ...

  9. angular 自定义指令参数详解【转】【个人收藏用】

    restrict:指令在dom中的声明形式 E(元素)A(属性)C(类名)M(注释) priority优先级:一个元素上存在两个指令,来决定那个指令被优先执行 terminal:true或false, ...

  10. sass compass问题小结

    1.中文注释编译报错Invalid GBK character的问题,找到ruby sass安装目录,如D:\Ruby22-x64\lib\ruby\gems\2.2.0\gems\sass-3.4. ...