SpringBoot
_Delores_
这个作者很懒,什么都没留下…
展开
-
Debug:No enum constant org.apache.ibatis.type.JdbcType.Integer
原因mybatis中JdbcType没有Integer类型,可查看映射表,mapper或配置中将INTEGER写成了IntegerMybatisjavaSQLintegerint OR IntegerINTEGERlonglong OR java.lang.LongBIGINTshortshort OR java.lang.ShortSMALLINTfloatfloat OR java.lang.FloatFLOATdoubledouble原创 2020-10-26 15:12:12 · 929 阅读 · 0 评论 -
Java中读取properties 配置文件的方式汇总
Java中读取properties 配置文件的方式汇总文章目录Java中读取properties 配置文件的方式汇总1.基于ClassLoder读取配置文件2.使用java.util.ResourceBundle类的getBundle()方法3.使用java.util.PropertyResourceBundle类的构造函数4.基于 InputStream 读取配置文件如题目所示,直接上方法。1.基于ClassLoder读取配置文件注意:该方式只能读取类路径下的配置文件filePath 为类路径下原创 2020-08-31 16:15:18 · 506 阅读 · 0 评论 -
JPA根据Id获取数据时报错(Type definition error: [simple type, class JavassistLazyInitializer)
在用springboot根据id获取一个对象时出现以下异常:Type definition error: [simple type, class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer]; nested exception is com.fasterxml.jackson.databind.exc.Invalid...原创 2019-11-08 15:03:59 · 8597 阅读 · 0 评论 -
JPA插入数据时报错(could not execute statement)
JPA插入数据时报错(could not execute statement)There was an unexpected error (type=Internal Server Error, status=500).could not execute statement; nested exception is org.hibernate.exception.GenericJDBCExce...原创 2019-11-08 14:57:57 · 15573 阅读 · 0 评论 -
springboot使用JPA数据访问启动报错:Cannot determine embedded database driver class for database type NONE
springboot使用JPA数据访问启动报错:Cannot determine embedded database driver class for database type NONEmaven工程: SpringBoot1.5 +Web+JPA+MYSQL+JDBC报错信息如下:***************************APPLICATION FAILED TO STAR...原创 2019-11-07 00:09:22 · 2325 阅读 · 0 评论 -
springboot使用jpa启动报错consider defining a bean of type '*.*.**Repository' in your configuration.
springboot使用JPA数据访问启动报错consider defining a bean of type ‘..**Repository’ in your configuration.maven工程: SpringBoot1.5 +Web+JPA+MYSQL+JDBC报错信息***************************APPLICATION FAILED TO START...原创 2019-11-07 00:00:11 · 1936 阅读 · 0 评论 -
spring boot自动注入出现Consider defining a bean of type 'xxx' in your configuration问题
搭建完spring boot的demo后自然要实现自动注入来体现spring ioc的便利了,但是我在实施过程中出现了这么一个问题,见下面,这里找到解决办法记录下来,供遇到同样的问题的同僚参考Description:Field userRepository in com.addresslist.controller.UserController required a bean of type...原创 2019-11-06 23:48:41 · 655 阅读 · 0 评论 -
报错:NestedIOException: Failed to parse mapping resource
报错:NestedIOException: Failed to parse mapping resource详细信息如下:BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw...原创 2019-09-10 23:35:40 · 8673 阅读 · 1 评论 -
SpringBoot整合ElasticSearch报错: java.net.UnknownHostException: http://x.x.x.x
SpringBoot整合ElasticSearch报错: java.net.UnknownHostException: http://x.x.x.x2019-09-09 21:26:40.845 ERROR 8800 --- [ main] o.s.boot.SpringApplication : Application startup faile...原创 2019-09-09 21:55:24 · 3599 阅读 · 0 评论 -
AmqpConnectException: java.net.ConnectException: Connection timed out: conn
org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection timed out: connect在SpringBoot中使用RabbitMQ时,容易出现、连接不成功的情况原因有下:1、SpringBoot的版本和RabbitMQ的版本不对应2、连接端口,默认5672,连接主机的端口也...原创 2019-09-07 22:17:27 · 2190 阅读 · 0 评论 -
SpringBoot整合Redis及相关操作
文章目录SpringBoot整合RedisSpringBoot整合Redis环境springboot 1.5.x + jdbc + mysql + web + redis + cache + mybatis配置文件application.ymlspring: datasource: url: jdbc:mysql://localhoost:3307/spring_cache ...原创 2019-09-06 14:24:07 · 320 阅读 · 0 评论 -
创建spring boot项目时无法访问https://start.spring.io的解决方法
最近用IDEA创建spring boot项目总是报错,用浏览器访问https://start.spring.io时,会被百度云加速的安全检查拦截,要输入验证码才能登录,导致无法访问。而在IDEA中,一直连不上官网,报403错误。试了网上各种办法,像关闭浏览器代理,IDEA的设置(setting ->HTTP Proxy->check connection),关闭防火墙都试过不起作用。...原创 2019-09-06 12:06:46 · 3861 阅读 · 2 评论 -
SpringBoot自定义启动器报错:xxxxAutoConfiguration中的需要XXXProperties.class类型的bean找不到
SpringBoot自定义启动器报错:Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2019-08-30 16:31:11.600 ERROR 8916 --- [ main] o.s.b.d....原创 2019-08-30 18:23:13 · 1953 阅读 · 0 评论 -
SpringBoot报错:The elements [spring.datasource.schema[0].classpath ] were left unbound.
SpringBoot报错:org.springframework.boot.context.properties.bind.UnboundConfigurationPropertiesException: The elements [spring.datasource.schema[0].classpath,spring.datasource.schema[1].classpath] were l...原创 2019-08-29 11:41:57 · 18855 阅读 · 1 评论 -
SpringBoot中配置sql文件执行控制台不报错却没有建表
SpringBoot中配置sql文件执行控制台不报错却没有建表使用SpringBoot 2.1.7.RELEASE版本因为SpringBoot在启动时,只有检测到spring.datasource.initialization-mode=ALWAYS配置,然后再检测spring.datasource.schema,且配置的sql文件中命令不为空,才会去执行schema和spring.datas...原创 2019-08-28 16:40:48 · 1845 阅读 · 0 评论 -
SpringBoot启动报错:HikariPool-1 - Exception during pool initialization.
SpringBoot启动报错:HikariPool-1 - Exception during pool initialization.com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure原因:jdbc连接失败解决办法:1、仔细检查username、password、url中IP地...原创 2019-08-28 14:03:56 · 55181 阅读 · 8 评论