springboot
niceguy_smile
Java资深技术专家,专注于java领域,并发编程,jvm,分布式微服务等 欢迎各位大佬共同交流技术
展开
-
Springboot整合Logback java.lang.IllegalStateException: Logback configuration error detected:
Exception in thread "restartedMain" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Na...原创 2019-12-14 03:21:59 · 2224 阅读 · 2 评论 -
Springboot整合redis org.springframework.beans.factory.UnsatisfiedDependencyException
异常信息如下:org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'questionTypeImportConfig' defined in file [J:\ideapro\nice-bbs\nice-bbs-client\target\classes\...原创 2019-12-08 05:47:07 · 506 阅读 · 0 评论 -
谈一谈对mybatis逆向工程的看法
mybatis逆向工程不适合大项目,毕竟sql都是写死的,不灵活, 而且像count(*)这种函数效率很低,返回的类型还是int,然后还不支持多表关联查询(不过join本身效率就低,这个不支持也就不支持了),mybatis的逆向工程对于分页来说并不友好,而且有些mapper修改完之后下次生成还会覆盖...原创 2019-12-03 17:56:11 · 994 阅读 · 0 评论 -
记录一次项目中遇到的问题
为了实现一个问题不存在的弹框功能一直进入到error里面,我排查了半天,没找出问题后来发现请求头是而我后台写的是charset=UTF-8是我自己添加上去的,我却一直埋怨和视频上面的差不多,实现的结果却不一样,等于自己给自己挖了个坑多亏了朋友帮我远程找出了问题...原创 2019-11-26 15:10:49 · 199 阅读 · 0 评论 -
springboot整合mybatis org.mybatis.spring.MyBatisSystemException
Resolved exception caused by handler execution: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapp...原创 2019-11-21 18:18:24 · 489 阅读 · 0 评论 -
mybatis Resolved exception caused by handler execution: org.mybatis.spring.MyBatisSystemException
Resolved exception caused by handler execution: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named '...原创 2019-11-20 16:18:23 · 1122 阅读 · 0 评论 -
Springboot使用Beanutils转换mybatis逆向工程生成的类抛出java.lang.ClassCastException
异常如下:java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at org.apache.ibatis.type.IntegerTypeHandler.setNonNullParameter(IntegerTypeHandler.java:26) ~[mybatis-3....原创 2019-11-19 16:59:27 · 533 阅读 · 0 评论 -
springboot整合mybatis逆向工程 import导入mapper飘红解决方案
在mapper接口上加上@Repository注解或者@Mapper注解即可。原创 2019-11-19 15:13:27 · 658 阅读 · 0 评论 -
springboot自定义拦截器类中使用@Autowired注解为空解决方案
加上@Service注解即可解决调用的时候加上@Autowired注解代码如下:package com.nice.interceptor;import com.nice.mapper.UserMapper;import com.nice.model.User;import org.springframework.beans.factory.annotation.A...原创 2019-11-17 09:38:44 · 882 阅读 · 0 评论 -
Springboot整合mybatis org.springframework.beans.factory.UnsatisfiedDependencyException
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2019-11-16 20:30:21.538 ERROR 18740 --- [ restartedMain] o.s.boot.SpringApplication ...原创 2019-11-16 20:38:47 · 988 阅读 · 0 评论 -
Springboot整合elasticsearch
项目架构为:Pom依赖:<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=...原创 2019-11-16 07:13:59 · 261 阅读 · 0 评论 -
thymeleaf表单回显数据
input标签要用th:value,而textarea标签要用th:text来实现原创 2019-11-14 07:11:52 · 1158 阅读 · 0 评论 -
记录两次空指针问题的解决方案
以前看到空指针问题总感觉束手无策,不知道怎么定位和解决,然而通过一直以来的的努力,终于知道了该怎么处理。先贴代码:@PostMapping("/publish") public String doPublish( @RequestParam("title") String title, @RequestParam("descript...原创 2019-11-13 22:54:34 · 360 阅读 · 0 评论 -
springboot整合flyway数据库迁移
[ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:6.0.8:migrate (default-cli) on project nice-community: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException:[ERROR] Mig...原创 2019-11-13 15:16:33 · 810 阅读 · 1 评论 -
springboot整合h2 数据库迁移 org.flywaydb.core.api.FlywayException解决方案
[INFO] --------------------------------[ jar ]---------------------------------[INFO][INFO] --- flyway-maven-plugin:6.0.8:migrate (default-cli) @ nice-community ---[INFO] Flyway Community Edition 6...原创 2019-11-13 13:25:50 · 2693 阅读 · 1 评论 -
idea clone failed
git@github.com: Permission denied (publickey). Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.换成http的下载方式就好了...原创 2019-11-12 18:09:22 · 2601 阅读 · 1 评论 -
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server versio
字段中是否有类似desc的关键字,可以加上`字段名`来解决,如果用的是mybatisplus这样的工具,只能修改数据库的字段名来解决原创 2019-11-12 17:00:27 · 130 阅读 · 0 评论 -
springboot整合h2数据库 org.h2.jdbc.JdbcSQLException: Database may be already in use: null
h2数据库不支持多连接,项目和工具同时连接会产生冲突,点击红色小方块,之后重新启动项目即可解决原创 2019-11-12 05:27:01 · 4627 阅读 · 2 评论 -
springboot整合h2数据库 org.h2.jdbc.JdbcSQLException
错误信息:This application has no explicit mapping for /error, so you are seeing this as a fallback.Tue Nov 12 05:13:06 CST 2019There was an unexpected error (type=Internal Server Error, status=500)....原创 2019-11-12 05:17:51 · 1845 阅读 · 0 评论 -
springboot整合github登录接口认证失败解决方案
错误提示:error=incorrect_client_credentials&error_description=The+client_id+and%2For+client_secret+passed+are+incorrect.&error_uri=https%3A%2F%2Fdeveloper.github.com%2Fapps%2Fmanaging-oauth-apps...原创 2019-11-11 11:42:24 · 1021 阅读 · 1 评论 -
springboot整合thymeleaf出现404问题
先关闭项目mvn clean再mvn install之后再启动项目既可解决原创 2019-11-10 00:33:33 · 2369 阅读 · 1 评论 -
springboot整合dbcp+jdbctemplate
JdbcTemplate我们平时很少用,但是呢对于做开发的我们还是熟悉一下比较好项目架构为:表结构为:CREATE TABLE `t_user` ( `id` int(12) NOT NULL AUTO_INCREMENT, `user_name` varchar(60) NOT NULL, `sex` int(3) NOT NULL DEFAULT '1',...原创 2019-11-08 22:08:06 · 761 阅读 · 0 评论 -
springboot+mybatis com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException异常解决方案
## Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '219' for key 'PRIMARY'### The error may involve com.atguigu.gmall.mana...原创 2019-11-08 14:17:07 · 1480 阅读 · 1 评论 -
springboot整合dbcp A component required a bean of type 'javax.sql.DataSource' that could not be found.
加上<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId></dependency>就好了原创 2019-11-08 08:09:40 · 6898 阅读 · 1 评论 -
springboot整合dubbo com.alibaba.dubbo.rpc.RpcException异常解决方案
看看是不是忘了加@Service注解用dubbo控制台看是服务没有注册上还是消费者的问题注意是dubbo包下的不是spring包下的看看是不是忘了用@MapperScan扫描包再查看包名是不是写错了注意:dubbo新版本的控制台消费者没有在这个列表里而是在点击服务后:...原创 2019-11-06 19:37:39 · 1157 阅读 · 0 评论 -
Springboot约定编程
项目架构为:ProxyBean代码:package com.nice.config;import com.nice.intercept.Interceptor;import com.nice.intercept.MyInterceptor;import com.nice.invoke.Invocation;import org.springframework.aop.fra...原创 2019-11-05 19:52:37 · 271 阅读 · 0 评论 -
springboot整合mybatis+dubbo时javax.management.InstanceNotFoundException
解决方案取消选中这个原创 2019-11-04 22:36:25 · 279 阅读 · 0 评论 -
springboot整合dubbo java.io.EOFException: null
检查数据库配置我是数据库驱动忘了配置原创 2019-11-04 19:26:04 · 773 阅读 · 0 评论 -
springboot整合dubbo javax.management.InstanceNotFoundException解决方案
javax.management.InstanceNotFoundException: org.springframework.boot:type=Admin,name=SpringApplicationjavax.management.InstanceNotFoundException: org.springframework.boot:type=Admin,name=SpringAp...原创 2019-11-04 19:22:41 · 926 阅读 · 0 评论 -
springboot整合dubbo java.lang.ExceptionInInitializerError
D:\Java\jdk1.8.0_202\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:60429,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.manageme...原创 2019-11-04 18:46:27 · 853 阅读 · 0 评论 -
学习springboot整合dubbo的一个小插曲
日志级别设置成logging.level.root=debug就会提示=========================AUTO-CONFIGURATION REPORT=========================Positive matches:----------------- DataSourceAutoConfiguration matched...原创 2019-11-04 17:56:06 · 650 阅读 · 0 评论 -
springboot bean生命周期
项目架构为:Pom.xml:<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaL...原创 2019-11-01 06:57:52 · 661 阅读 · 0 评论 -
springboot ioc通过扫描装配bean
项目架构为AppConfig.java:package com.nice.boot.config;import org.springframework.context.annotation.ComponentScan;import org.springframework.context.annotation.Configuration;/** * @author ning...原创 2019-11-01 02:18:03 · 455 阅读 · 0 评论 -
org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression解决方案
看看thymeleaf标签是不是没有接收到后台传递过来的值Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: "bbsUser.bbsUserName" (template: "invitation/hobby_invitation_...原创 2019-10-28 21:37:05 · 14873 阅读 · 0 评论 -
springboot ioc装配bean
项目架构为:AppConfig代码为:package com.nice.config;import com.nice.domain.User;import org.springframework.context.ApplicationContext;import org.springframework.context.annotation.AnnotationConfigAp...原创 2019-10-28 18:59:52 · 300 阅读 · 0 评论 -
org.springframework.web.bind.MissingServletRequestParameterException解决方案
直接把@RequestParam注解去掉即可解决原创 2019-10-27 22:46:06 · 6642 阅读 · 4 评论 -
springboot整合mybatis bean注入失败最新解决方案
先贴图先说说我的具体排查思路1.先看看数据库类型和实体类类型是否一致2.是否忘了加注解3.检查配置文件的数据源配置和mybatis配置4.换个数据源5.写单元测试类绕过service层6.看pom文件的resource注解配置的mapper路径是否正确,xml配置文件路径是否和mapper接口类路径一致7.看xml配置文件中的mapper路径是否写错8.检查p...原创 2019-10-24 19:38:29 · 1505 阅读 · 0 评论