Spring Boot 之Spring Boot Starter依赖包及作用 spring-boot-starter 这是Spring Boot的核心启动器,包含了自动配置.日志和YAML. spring-boot-starter-amqp 通过spring-rabbit来支持AMQP协议(Advanced Message Queuing Protocol. . spring-boot-starter-aop 支持面向方面的编程即AOP,包括spring-aop和AspectJ. spring-…
spring boot启动STS 运行报错 java.lang.NoClassDefFoundError: ch/qos/logback/classic/LoggerContext 学习了: http://ask.csdn.net/questions/381580 http://blog.csdn.net/liuxiangke0210/article/details/77893560?locationNum=2&fps=1 增加了: <dependency> <groupId&g…
springboot集成redis时,引入spring-boot-starter-redis包报错,maven找不到这个资源.如下图: 我的项目中,spring boot是 用的2.0.4版本.spring-boot-starter-redis在springboot 1.4.7版本后,改为了spring-boot-starter-data-redis, 所以如果想集成redis,应该引用spring-boot-starter-data-redis. 如果就是想用前者,那么就应该加上版本号. <d…
改成 war 不错了,但是打包麻烦 pom 文件报错 UnKnown Error第一次碰到这个问题,花了几个小时才解决,除了UnKnown 没有任何提示.网上搜的大部分情况都不是我遇到的. 还是没有解决, 后来去maven仓库搜了一下没有2.1.5版本的spring-boot-starter-parent的包.报错的原因是jar包版本太高了 改成2.1.1解决…
spring-boot-starter 这是Spring Boot的核心启动器,包含了自动配置.日志和YAML. spring-boot-starter-amqp 通过spring-rabbit来支持AMQP协议(Advanced Message Queuing Protocol. . spring-boot-starter-aop 支持面向方面的编程即AOP,包括spring-aop和AspectJ. spring-boot-starter-artemis 通过Apache Artemis支持…
使用Spring boot整合Hive,在启动Spring boot项目时,报出异常: java.lang.NoSuchMethodError: org.eclipse.jetty.servlet.ServletMapping.setDefault(Z)V 经过排查,是maven的包冲突引起的,具体做法,排除:jetty-all.hive-shims依赖包.对应的pom配置如下: <dependency> <groupId>org.apache.hive</groupId&g…
在使用Spring Boot JPA分页 PageRequest分页时,出现如下错误: 本来以为是包导入出现了问题,结果发现并不是.导入包如下: 后来在网上查找相关资料,发现这样的用法,好像也可以用,但他们提示的都是此方法已过期.我的不知道为什么报错了. 后来去源码里找了一下这个方法,发现源码中方法如下: 于是把上面报错的代码修改为: Pageable pageable1 = PageRequest.of(0, 11, Sort.Direction.ASC, "orderNo"); 错…
在spring boot jpa 中自定义sql,执行update操作报错解决办法: 在@Query(...)上添加 @Modifying@Transactional注解…
解决参考文章:https://blog.csdn.net/hengyunabc/article/details/78762097 spring boot启动报错如下: Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. -- :: --- [ main] o.s.b.d.LoggingFailureAnal…
启动报错: 2018-05-16 17:22:58.161 ERROR 4080 --- Disconnected from the target VM, address: '127.0.0.1:50529', transport: 'socket' [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START **********…
我拷贝了一个springboot 项目,然后去掉了数据源配置启动报错 : Cannot determine embedded database driver class for database type NONE Action: If you want an embedded database please put a supported one on the classpath. 然后我新建一个项目重新配置(没有配置数据源),启动还是报错这个 加入这个,搞定....项目启动不去加载就好了 参…
1.网上搜的都说是将SpringBoot2.1.5版本降级到SpringBoot2.1.4版本,感觉这治标不治本啊,以后想升级不是玩完了. 错误如下所示: 参考:https://ask.csdn.net/questions/764470?sort=id 解决这个问题只需要,在pom.xml 文件中的 properties 加入maven jar 插件的版本号. 错误原因呢,报错是因为版本不兼容问题,将Maven的版本降到3.1.1就可以了,在pom的properties中添加 <maven-ja…
如果你遇见下面的错误,很可能是你的springboot和es版本关系不对应 ERROR 14600 --- [ main] .d.e.r.s.AbstractElasticsearchRepository : failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#…
问题1, [ERROR]Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project motherBuyBoot: There are test failures. [ERROR] Please refer to D:\web\motherbuy\target\surefire-reports for the individual test r…
错误: org.thymeleaf.exceptions.TemplateInputException: Error resolving template "Hello", template might not exist or might not be accessible by any of the configured Template Resolvers at org.thymeleaf.TemplateRepository.getTemplate(TemplateReposi…
1.在 pom.xml 中配置相关的 jar 依赖: <!-- 加载 spring boot redis 包 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> 2.在  Springboot  核心配置文件  ap…
问题:eclipse neon4.6.3新建springboot项目时pom.xml报错unknown error 原因: spring boot 2.1.8更新了maven插件,eclipse不兼容. 解决方法: 在pom.xml的中加入maven-jar-plugin的版本或把spring boot降到2.1.4及以下即可,然后update projects就可以了. <parent> <groupId>org.springframework.boot</groupId&…
使用Spring进行web开发时,第一步就是导入jar包,今天使用SPring Task开发定时器时,导入了好多次jar包,都是报错,不知道是因为jar包版本不同还是因为需要依赖的jar包没加入,反正就是怎么着都不行. 后来终于找着全的了. 首先记录一下spring jar包报错的常见bug: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfram…
前言: 这一篇讲的是Spring Boot中Redis的运用,之前没有在项目中用过Redis,所以没有太大的感觉,以后可能需要回头再来仔细看看. 原文出处: 纯洁的微笑 SpringBoot对常用的数据库支持外,对NoSQL 数据库也进行了封装自动化. redis介绍 Redis是目前业界使用最广泛的内存数据存储.相比memcached,Redis支持更丰富的数据结构,例如hashes, lists, sets等,同时支持数据持久化.除此之外,Redis还提供一些类数据库的特性,比如事务,HA,…
前面介绍了Spring Boot 中的整合Mybatis并实现增删改查,.不清楚的朋友可以看看之前的文章:https://www.cnblogs.com/zhangweizhong/category/1657780.html. 今天主要讲解Springboot整合Redis.Redis是目前使用最多的缓存,包括Spring Boot 中我们也是会用Redis做很多事情.那么今天就来说一说Spring Boot如何整合Redis.Spring Boot整合Redis 需要那些步骤呢? 一.整合 新…
Spring boot 打成jar包问题总结 1.Unable to find a single main class from the following candidates 1.1.问题描述 maven build时出现以下错误提示日志: [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.3.5.RELEASE:repackage (default) on project i…
陆陆续续,零零散散,栈长已经写了几十篇 Spring Boot 系列文章了,其中有介绍到 Spring Boot Starters 启动器,使用的.介绍的都是第三方的 Starters ,那如何开发一个自己的 Spring Boot Starter 呢? 下面带大家开发一个年轻人的第一个 Spring Boot Starter! 不知道 Starters 为何物的请进这个传送门===> Spring Boot Starters 启动器,看完有了学习基础,我们再继续下面的自定义 Starter 实…
Spring Boot + Mybatis + Redis二级缓存开发指南 背景 Spring-Boot因其提供了各种开箱即用的插件,使得它成为了当今最为主流的Java Web开发框架之一.Mybatis是一个十分轻量好用的ORM框架.Redis是当今十分主流的分布式key-value型数据库,在web开发中,我们常用它来缓存数据库的查询结果. 本篇博客将介绍如何使用Spring-Boot快速搭建一个Web应用,并且采用Mybatis作为我们的ORM框架.为了提升性能,我们将Redis作为Myb…
1. 前言 随着Spring的日渐臃肿,为了简化配置.开箱即用.快速集成,Spring Boot 横空出世. 目前已经成为 Java 目前最火热的框架了.平常我们用Spring Boot开发web应用.Spring mvc 默认使用tomcat servlet容器, 因为Spring mvc组件集成了spring-boot-starter-tomcat .但是现在undertow servlet容器的性能非常好.我们可以通过以下方式先排除tomcat: 然后直接替换为undertow: 代码无需…
1.pom文件依赖 <!--spring boot 与redis应用基本环境配置 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-redis</artifactId> </dependency><!--spring session 与redis应用基本环境配置,需要开启redis后…
Springboot将accessToke写入Redisk 缓存,springboot集成Redis出现报错 No qualifying bean of type 'org.springframework.data.redis.connection.RedisConnectionFactory' 原因:我们在pom.xml中引入了spring-boot-starter-data-redis却没有引入redis.client 解决方式:增加redis client依赖即可 <dependency>…
[本文章是否对你有用以及是否有好的建议,请留言] 本文章牵涉到的技术点比较多:Spring Data JPA.Redis.Spring MVC,Spirng Cache,所以在看这篇文章的时候,需要对以上这些技术点有一定的了解或者也可以先看看这篇文章,针对文章中实际的技术点在进一步了解(注意,您需要自己下载Redis Server到您的本地,所以确保您本地的Redis可用,这里还使用了MySql数据库,当然你也可以内存数据库进行测试).这篇文章会提供对应的Eclipse代码示例,具体大体的分如下…
Redis 简介 什么是 Redis Redis 是目前使用的非常广泛的免费开源内存数据库,是一个高性能的 key-value 数据库. Redis 与其他 key-value 缓存(如 Memcached )相比有以下三个特点: 1.Redis 支持数据的持久化,它可以将内存中的数据保存在磁盘中,重启的时候可以再次加载进行使用. 2.Redis 不仅仅支持简单的 key-value 类型的数据,同时还提供 list,set,zset,hash 等数据结构的存储. 3.Redis 支持数据的备份…
一.Spring Boot Starter简介 Starter是Spring Boot中的一个非常重要的概念,Starter相当于模块,它能将模块所需的依赖整合起来并对模块内的Bean根据环境( 条件)进行自动配置.使用者只需要依赖相应功能的Starter,无需做过多的配置和依赖,Spring Boot就能自动扫描并加载相应的模块. 总结: 1.它整合了这个模块需要的依赖库: 2.提供对模块的配置项给使用者: 3.提供自动配置类对模块内的Bean进行自动装配: 例如,在Maven的依赖中加入sp…
前言 短信服务在用户注册.登录.找回密码等相关操作中,可以让用户使用更加便捷,越来越多的公司都采用短信验证的方式让用户进行操作,从而提高用户的实用性. Spring Boot Starter 由于 Spring boot 的约定大于配置的理念,使得在使用Spring变得更加方便.Spring Boot 项目组提供了很多Starter ,让我们在使用 Spring 的时候变得非常容易.对于官方提供的Starter 采用 spring-boot-starter-xxx开头,对于非官方提供的Sprin…