SpirngBoot启动报错component required a bean of type‘PlatformTransactionManager‘ that could not be found

出现 Error creating bean with name xxx defined in class 的解决方法 阅读详情

困扰了好一会得问题.其实我目前仍未彻底搞懂这个问题的出现!最终还是排除掉这个类解决.
场景出现是网关服务依赖了common包,全局事务存在common包中的config
至于说为什么会出现此问题,还请各位指点一二!

  • 问题出现部分截图,上半部分是警告信息,我认为是有用的
2022-09-26 15:37:43.239  WARN 120216 --- [           main] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'meterRegistryPostProcessor' defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/MetricsAutoConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.annotation.ProxyCachingConfiguration': BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionAdviceConfig': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.transaction.PlatformTransactionManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
Disconnected from the target VM, address: '127.0.0.1:52369', transport: 'socket'
2022-09-26 15:37:43.456 ERROR 120216 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

A component required a bean of type 'org.springframework.transaction.PlatformTransactionManager' that could not be found.

The following candidates were found but could not be injected:
	- Bean method 'transactionManager' in 'DataSourceTransactionManagerAutoConfiguration.DataSourceTransactionManagerConfiguration' not loaded because @ConditionalOnSingleCandidate (types: javax.sql.DataSource; SearchStrategy: all) did not find any beans


Action:

Consider revisiting the entries above or defining a bean of type 'org.springframework.transaction.PlatformTransactionManager' in your configuration.
  • 解决办法如下:

因为全局事务对于网关来说其实没什么作用,所以我这里直接就排除掉了.希望能帮到各位!

@SpringBootApplication
(
        exclude ={DataSourceAutoConfiguration.class}
)
@EnableDiscoveryClient
@ComponentScan( //这部分是重点!
       basePackages = {"com.zhby.*"},
        excludeFilters = {
               @ComponentScan.Filter(
                        type = FilterType.ASSIGNABLE_TYPE,
                       classes = {TransactionAdviceConfig.class})
        })
  • 希望能帮到各位
基于三轴加速度计的塑料水管泄漏振动检测技术全解析 在流体力学与结构动力学领域,管道振动分析是评估系统健康状态的关键技术。其基本原理在于,当管道内流体状态发生异常(如泄漏)时,会引发管壁产生特定的机械振动信号。这项技术的核心价值在于实现了对管道系统的非侵入式、在线监测,能够提前预警潜在故障,避免资源浪费与次生灾害。在智慧城市与智能水务等应用场景中,它对于保障供水管网安全、提升运维效率具有重要意义。本文聚焦于如何利用高精度的三轴加速度计,精准捕捉塑料水管因泄漏产生的微弱振动,并通过信号处理与机器学习算法,构建一套从数据采集到泄漏识别与定位的完整工程解决方案。 阅读详情

相关推荐

美团mtgsig 3.1.0算法还原:从加密入口到d1生成的完整链路拆解

本文详细拆解了美团mtgsig 3.1.0签名算法的完整逆向过程。通过定位加密入口函数eH,理清a6、a5、a8到d1的生成依赖链,并运用插桩技术,在JSVMP混淆环境下逐步还原了核心参数的生成逻辑,为逆向工程实践提供了清晰的纯算还原方法论。

oo7890的博客 776

required a bean of type ‘org.springframework..mail.javamail.JavaMailSender‘ that could not be found.

1.显示找不到bean,注释该项,又报url有错误 2.注释该项,又报url有错误 3.解决: 检查pom.xmlpom打包方式,删除pom,必须为jar打包方式,默认jar打包,所以不用写。

时来时去时不返 1万+

8.5/Q1,Charls最新高分文章解读!

8 257名受试者中,672人(8.14%)在9年内发生过卒中。在调整的多因素cox回归模型中,TyG和ABSI仍然是卒中的预测因素,TyG的HR为1.25(95%CI:1.06~1.47),ABSI的HR为1.33(95%CI:1.06~1.68)。TyG和ABSI联合诊断效能最高(AUC:0.579,95%CI:0.553~0.597),而TyG(AUC:0.566,95%CI:0.544~0.587)和ABSI(AUC:0.533,95%CI:0.524~0.597)的诊断效能最低。

gsky_sci的博客 1014

一个诡异的A component required a bean of type异常

A component required a bean of type 'org.springframework.security.authentication.AuthenticationManager' that could not be found. springboot的主启动类,与包下各个组件的加载问题。因为启动类上面的@SpringBootApplication里面默认包含了一个@ComponentScan注解,这个注解默认情况下是扫描该类所属包下面的所有类,包含子目录中的类。

louis_lee7812的专栏 2万+

ctx->cvdl->cuvidGetDecoderCaps(&ctx->caps8) failed -> CUDA_ERROR_DEINITIALIZED: driver shutting down

ffplay -vcodec h264_cuvid sample_720p-2.h264 [quantum6@freeswitch freeswitch]$ ffplay -vcodec h264_cuvid sample_720p-2.h264 ffplay version 4.3.1 Copyright (c) 2003-2020 the FFmpeg developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44) .

柳鲲鹏 2404

环形平滑标签(Circular Smooth Label, CSL)技术详解

环形平滑标签(CSL)是一种优化算法,旨在解决旋转目标检测中角度预测的边界问题。通过将角度回归转化为分类任务,并利用窗口函数平滑标签分布,CSL有效处理了角度周期性的梯度突变问题。其核心原理包括角度离散化和平滑标签编码,通过高斯、矩形、三角等窗口函数生成概率分布。CSL在技术实现上涉及标签转换流程、模型结构调整和损失函数优化,显著提升了检测精度和稳定性。在DOTA数据集上的实验表明,CSL在mAP和角度误差方面优于传统方法。应用场景包括遥感图像分析、自动驾驶和工业质检,部署时需注意旋转NMS编译和ONNX导

浩瀚之水的专栏 640

Spring Aop @target的坑

target匹配的是运行时的类型,会给所有bean生成代理类,生成失败就会报错。

hello_qaz123的博客 1463

【OpenAI】Python:(1) 基于 Gym-CarRacing 的自动驾驶项目 | 前置知识介绍 | 项目环境准备 | 手把手带你一步步实现

本篇是关于多伦多大学自动驾驶专业项目 Gym-CarRacing 的博客。GYM-Box2D CarRacing 是一种在 OpenAI Gym 平台上开发和比较强化学习算法的模拟环境。它是流行的 Box2D 物理引擎的一个版本,经过修改以支持模拟汽车在赛道上行驶的物理过程。由于内容比较多所以分多次更新,本篇是关于前置知识介绍,以及项目环境准备的。

有道无术, 术尚可求。有术无道, 止于术。 5053

启动SpringBoot报JavaMail加载错误

SpringBoot报加载JavaMail失败的错误分析

古辛博格 2649

基于STM32LXXX的模数转换芯片ADC(TLA2528IRTER)驱动C程序设计

define TLA2528_ADDR 0x12 << 1 // 用于HAL传输的8位地址(写入为0x24,读取为0x25)// 100kHz (示例值,需根据实际时钟计算)#define TLA2528_REG_PIN_CFG 0x00 // 引脚配置寄存器。#define TLA2528_REG_CHN_SEL 0x01 // 通道选择寄存器。

myron6688的博客 229

手把手教你完成YOLOv8 PyQt5和PySide6目标检测界面搭建,前台系统+后台管理系统开发实战,可用于大论文凑工作量或毕设必备,全网最详细教程

目标检测是计算机视觉中的重要任务,广泛应用于安防监控、自动驾驶、智能家居等领域。YOLO系列模型由于其高效的检测速度和较高的准确率,成为目标检测任务的首选算法之一。本项目结合 YOLOv8 与 PyQt5,构建了一个图形化界面,便于用户进行目标检测的操作和展示,实现对图片、视频和摄像头的实时目标检测,不仅可以用于大论文的工作量展示,还可以作为毕业设计。支持目标检测、目标分割等模型进来检测

在职AI算法工程师,擅长计算机视觉,YOLO目标检测、分割等,擅长web、pyqt界面可视化,好内容持续更新中,来这里跟大家一起学习,共同进步 1万+

springboot2 nacos JavaMailSenderImpl not found

排查springboot2 nacos JavaMailSendImpl Not found问题

酸衡子的博客 2137

基于Verilog的8位CPU设计及UART扩展实现方案,包含完整的架构设计、核心代码实现和仿真验证方法

基于Verilog的8位CPU设计及UART扩展实现方案,包含完整的架构设计、核心代码实现和仿真验证方法

a_zxswer的博客 189

spring注解驱动@Transactional使用

package com.annotation.config; import com.mchange.v2.c3p0.ComboPooledDataSource; import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.config.Configurab...

qq_36722039的博客 4877

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

PlatformTransactionManager使用异常

使用了maven分出多个功能模块,每个模块都有自己的service,使用@Configuration @EnableTransactionManagement @EnableJpaRepositories 注入配置及bean,运行时报错 org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying ...

左北右西 9330

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

Error creating bean with name 'methodValidationPostProcessor' defined in class path resource

异常:Error creating bean with name ‘methodValidationPostProcessor’ defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Unsatisfied depen...

qq_40051434的博客 2万+

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

【SpringBoot】Error creating bean with name ‘methodValidationPostProcessor‘ defined in class path reso

报错代码: Correct the classpath of your application so that it contains a single, compatible version of org.springframework.util.ClassUtils 2020-08-04 12:34:05.306 ERROR 7164 --- [ main] o.s.test.context.TestContextManager : Caught exception wh

alovelypeach的博客 1万+

SpringBoot多数据源@Transaction注解的坑,No qualifying bean of type ‘org.springframework.transaction.Platform

首先看下遇到的错误 org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.transaction.PlatformTransactionManager' available at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(De

qq_39486119的博客 12万+

解决No qualifying bean of type ‘org.springframework.transaction.PlatformTransactionManager‘

总之,要么是没有事务管理器,要么是太多没指定。

web13985085406的博客 5828

【错误】A component required a bean of type ‘org.springframework.security.config.annotation.ObjectPostPr

错误

sh1307212321的博客 7799

运行springboot出现“A component required a bean of type...that could not be found“问题

1.给主类XXXApplication加注解@MapperScan("包名.mapper文件夹名")查看导入的@Mapper是否正确。

weixin_68429349的博客 1万+

required a bean of type ‘org.springframework.web.client.RestTemplate‘ that could not be found 解决方法

在使用SpringBoot时不能自动注入RestTemplate,具体报错信息如下 Field restTemplate in 'xxx' required a bean of type 'org.springframework.web.client.RestTemplate' that could not be found. The injection point has the following annotations: - @org.springframework.beans.factory.a

程序员大佬超的博客 1万+

Error creating bean with name ‘projectingArgumentResolverBeanPostProcessor‘ defined in class path re

由于更改了包名,导致此处报错。发生的原因:切入点错误。

慕白Lee的博客 7677

Consider defining a bean of type ‘org.springframework.transaction.PlatformTransactionManager‘ in you

【代码】Consider defining a bean of type 'org.springframework.transaction.PlatformTransactionManager' in you。

Knight 830

项目的一些Bug

Invalid bound statement (not found):

maxker的博客 2516

A component required a bean of type ‘XXX‘ that could not be found 解决办法

A component required a bean of type ‘XXX‘ that could not be found 解决办法

littleox_frighting的博客 8万+
上一篇: Spring Cloud/Boot启动报错Consider defining a bean of type ServerCodecConfigurer
下一篇: Aspose.Words开发者指南
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值