SpringClound项目相关

nacos本机模式非虚拟机启动也可正常连接

nacos中的配置中心相当于在application.yml中的相关配置,转移位置,内容同application.yml完全一样均可。

黑马项目导入后,依赖缺失:

  • 首先尝试maven重新加载,控制台提示传递依赖异常
[WARNING] The POM for com.baomidou:mybatis-plus-boot-starter:jar:3.4.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.11.4 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.11.4 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.4 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:jar:2.2.5.RELEASE is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:jar:2.2.5.RELEASE is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

尝试在缺失依赖处进行手动导入提示下方错误

2024-01-31 10:46:21.345 [main] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt:
提示自动配置失败,refresh方法调用失败

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apUserLoginController': Unsatisfied dependency expressed through field 'apUserService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'apUserMapper' defined in file [D:\project\heima-leadnews\heima-leadnews-service\heima-leadnews-user\target\classes\com\heima\user\mapper\ApUserMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
2024-01-31 10:46:21.360 [main] INFO  o.a.catalina.core.StandardService - Stopping service [Tomcat]
20 file:/D:/maven/respository/org/apache/hbase/hbase-protocol/2.1.5/hbase-protocol-2.1.5.jar, file:/D:/maven/respository/org/apache/hbase/thirdparty/hbase-shaded-miscellaneous/2.1.0/hbase-shaded-miscellaneous-2.1.0.jar, file:/D:/maven/respository/com/google/protobuf/protobuf-java/3.13.0/protobuf-java-3.13.0.jar, file:/D:/maven/respository/org/apache/hbase/thirdparty/hbase-shaded-netty/2.1.0/hbase-shaded-netty-2.1.0.jar, file:/D:/maven/respository/org/apache/zookeeper/zookeeper/3.4.10/zookeeper-3.4.10.jar, 2/knife4j-spring-boot-starter-2.0.2.jar, file:/D:/maven/respository/com/github/xiaoymin/knife4j-spring-boot-autoconfigure/2.0.2/knife4j-spring-boot-autoconfigure-2.0.2.jar, file:/D:/maven/respository/com/github/xiaoymin/knife4j-spring/2.0.2/knife4j-spring-2.0.2.jar, file:/D:/maven/respository/com/github/xiaoymin/knife4j-annotations/2.0.2/knife4j-annotations-2.0.2.jar, file:/D:/maven/respository/com/github/xiaoymin/knife4j-core/2.0.2/knife4j-core-2.0.2.jar, file:/D:/maven/respository/io/springfox/springfox-bean-validators/2.9.2/springfox-bean-validators-2.9.2.jar, file:/D:/maven/respository/com/github/xiaoymin/knife4j-spring-ui/2.0.2/knife4j-spring-ui- file:/D:/maven/respository/org/apache/tomcat/embed/tomcat-embed-core/9.0.43/tomcat-embed-core-9.0.43.jar, file:/D:/maven/respository/org/glassfish/jakarta.el/3.0.3/jakarta.el-3.0.3.jar, file:/D:/maven/respository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.43/tomcat-embed-websocket-9.0.43.jar, -slf4j-1.7.30.jar, file:/D:/maven/respository/org/projectlombok/lombok/1.18.8/lombok-1.18.8.jar, file:/D:/Software/IntelliJ%20IDEA%202021.2.1/lib/idea_rt.jar]
2024-01-31 10:46:21.392 [main] DEBUG o.s.b.a.l.ConditionEvaluationReportLoggingListener - 


============================
CONDITIONS EVALUATION REPORT  :条件评估报告,下方的自动配置可能失效
============================


Positive matches:
-----------------

   AopAutoConfiguration matched:
      - @ConditionalOnProperty (spring.aop.auto=true) matched (OnPropertyCondition)

   AopAutoConfiguration.ClassProxyingConfiguration matched:
      - @ConditionalOnMissingClass did not find unwanted class 'org.aspectj.weaver.Advice' (OnClassCondition)
      - @ConditionalOnProperty (spring.aop.proxy-target-class=true) matched (OnPropertyCondition)

   AuditEventsEndpointAutoConfiguration matched:
      - @ConditionalOnAvailableEndpoint no property management.endpoint.auditevents.enabled found so using endpoint default; @ConditionalOnAvailableEndpoint marked as exposed by a 'management.endpoints.jmx.exposure' property (OnAvailableEndpointCondition)

   CommonsClientAutoConfiguration.DiscoveryLoadBalancerConfiguration matched:
      - @ConditionalOnClass found required class 'org.springframework.boot.actuate.health.HealthIndicator' (OnClassCondition)
      - @ConditionalOnProperty (spring.cloud.discovery.enabled) matched; @ConditionalOnProperty (spring.cloud.discovery.blocking.enabled) matched (OnPropertyCondition)
      - @ConditionalOnBean (types: org.springframework.cloud.client.discovery.DiscoveryClient; SearchStrategy: all) found beans 'nacosDiscoveryClient', 'simpleDiscoveryClient', 'compositeDiscoveryClient' (OnBeanCondition)

   CommonsClientAutoConfiguration.DiscoveryLoadBalancerConfiguration#discoveryClientHealthIndicator matched:
      - @ConditionalOnProperty (spring.cloud.discovery.client.health-indicator.enabled) matched (OnPropertyCondition)

   CommonsClientAutoConfiguration.DiscoveryLoadBalancerConfiguration#discoveryCompositeHealthContributor matched:
      - @ConditionalOnProperty (spring.cloud.discovery.client.composite-indicator.enabled) matched (OnPropertyCondition)
      - @ConditionalOnBean (types: org.springframework.cloud.client.discovery.health.DiscoveryHealthIndicator; SearchStrategy: all) found bean 'discoveryClientHealthIndicator' (OnBeanCondition)

   CompatibilityVerifierAutoConfiguration matched:
      - @ConditionalOnProperty (spring.cloud.compatibility-verifier.enabled) matched (OnPropertyCondition)

   CompositeMeterRegistryAutoConfiguration matched:
      - @ConditionalOnClass found required class 'io.micrometer.core.instrument.composite.CompositeMeterRegistry' (OnClassCondition)

   ConditionsReportEndpointAutoConfiguration matched:
      - @ConditionalOnAvailableEndpoint no property management.endpoint.conditions.enabled found so using endpoint default; @ConditionalOnAvailableEndpoint marked as exposed by a 'management.endpoints.jmx.exposure' property (OnAvailableEndpointCondition)

   ConditionsReportEndpointAutoConfiguration#conditionsReportEndpoint matched:
      - @ConditionalOnMissingBean (types: org.springframework.boot.actuate.autoconfigure.condition.ConditionsReportEndpoint; SearchStrategy: current) did not find any beans (OnBeanCondition)

   ConfigurationPropertiesReportEndpointAutoConfiguration matched:
      - @ConditionalOnAvailableEndpoint no property management.endpoint.configprops.enabled found so using endpoint default; @ConditionalOnAvailableEndpoint marked as exposed by a 'management.endpoints.jmx.exposure' property (OnAvailableEndpointCondition)

   ConfigurationPropertiesReportEndpointAutoConfiguration#configurationPropertiesReportEndpoint matched:
      - @ConditionalOnMissingBean (types: org.springframework.boot.actuate.context.properties.ConfigurationPropertiesReportEndpoint; SearchStrategy: all) did not find any beans (OnBeanCondition)

   DiskSpaceHealthContributorAutoConfiguration matched:
      - @ConditionalOnEnabledHealthIndicator management.health.defaults.enabled is considered true (OnEnabledHealthIndicatorCondition)

   DiskSpaceHealthContributorAutoConfiguration#diskSpaceHealthIndicator matched:
      - @ConditionalOnMissingBean (names: diskSpaceHealthIndicator; SearchStrategy: all) did not find any beans (OnBeanCondition)

   DispatcherServletAutoConfiguration matched:
      - @ConditionalOnClass found required class 'org.springframework.web.servlet.DispatcherServlet' (OnClassCondition)
      - found 'session' scope (OnWebApplicationCondition)

   DispatcherServletAutoConfiguration.DispatcherServletConfiguration matched:
      - @ConditionalOnClass found required class 'javax.servlet.ServletRegistration' (OnClassCondition)


      - @ConditionalOnClass found required class 'org.springframework.http.converter.json.Jackson2ObjectMapperBuilder' (OnClassCondition)

   JacksonAutoConfiguration.JacksonObjectMapperBuilderConfiguration matched:
      - @ConditionalOnClass found required class 'org.springframework.http.converter.json.Jackson2ObjectMapperBuilder' (OnClassCondition)

   JacksonAutoConfiguration.JacksonObjectMapperBuilderConfiguration#jacksonObjectMapperBuilder matched:
      - @ConditionalOnMissingBean (types: org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; SearchStrategy: all) did not find any beans (OnBeanCondition)

   JacksonAutoConfiguration.JacksonObjectMapperConfiguration matched:
      - @ConditionalOnClass found required class 'org.springframework.http.converter.json.Jackson2ObjectMapperBuilder' (OnClassCondition)

io.micrometer.core.instrument.binder.jvm.ClassLoaderMetrics; SearchStrategy: all) did not find any beans (OnBeanCondition)

   JvmMetricsAutoConfiguration#jvmGcMetrics matched:
 CacheMeterBinderProvidersConfiguration.HazelcastCacheMeterBinderProviderConfiguration:
      Did not match:
         - @ConditionalOnClass did not find required classes 'com.hazelcast.spring.cache.HazelcastCache', 'com.hazelcast.core.Hazelcast' (OnClassCondition)

   CacheMeterBinderProvidersConfiguration.JCacheCacheMeterBinderProviderConfiguration:
      Did not match:
         - @ConditionalOnClass did not find required class 'javax.cache.CacheManager' (OnClassCondition)

   CacheMetricsAutoConfiguration:

         - @ConditionalOnWebApplication did not find reactive web application classes (OnWebApplicationCondition)

   WebSocketServletAutoConfiguration.JettyWebSocketConfiguration:
      Did not match:
         - @ConditionalOnClass did not find required class 'org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer' (OnClassCondition)

   WebSocketServletAutoConfiguration.UndertowWebSocketConfiguration:
      Did not match:
         - @ConditionalOnClass did not find required class 'io.undertow.websockets.jsr.Bootstrap' (OnClassCondition)

   XADataSourceAutoConfiguration:
      Did not match:
         - @ConditionalOnClass did not find required class 'javax.transaction.TransactionManager' (OnClassCondition)


Exclusions: 除外
-----------

    None


Unconditional classes: 无条件的类
----------------------

    com.github.tobato.fastdfs.FdfsClientConfig

   

    org.springframework.boot.autoconfigure.availability.ApplicationAvailabilityAutoConfiguration

    com.heima.common.exception.ExceptionCatch

    org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration

2024-01-31 10:46:21.408 [main] ERROR o.s.boot.SpringApplication - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apUserLoginController': Unsatisfied dependency expressed through field 'apUserService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'apUserMapper' defined in file [D:\project\heima-leadnews\heima-leadnews-service\heima-leadnews-user\target\classes\com\heima\user\mapper\ApUserMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660)
    at

Bean后置增强,注入失败

sqlSessionFactory:每个基于 MyBatis 的应用都是以一个 SqlSessionFactory 的实例为核心的,SqlSessionFactory 的实例可以通过 SqlSessionFactoryBuilder 获得。而 SqlSessionFactoryBuilder 则可以从 XML 配置文件中读取,结合上文初步推测,未正确读取nacos配置的数据源信息导致

 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1425)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
    at 

Process finished with exit code 1
 

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/659512.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

稀疏场景高性能训练方案演变|京东广告算法架构体系最佳实践

近年来,推荐场域为提升模型的表达能力和计算能力,模型规模和计算复杂度大幅增加,同时,高规格硬件资源为模型迭代、算法优化带来了更大的机遇和挑战。为了应对模型规模和算力升级带来的存储、IO和计算挑战,京东零售广告…

解决WindowServer2022关于EDGE浏览器识自签证书问题

1、证书颁发机构服务打开MMC控制台 添加证书、证书模板 2、复制证书模板

鸿蒙(HarmonyOS)项目方舟框架(ArkUI)之Gauge组件

鸿蒙(HarmonyOS)项目方舟框架(ArkUI)之Gauge组件 一、操作环境 操作系统: Windows 10 专业版、IDE:DevEco Studio 3.1、SDK:HarmonyOS 3.1 二、Gauge组件 数据量规图表组件,用于将数据展示为环形图表。 子组件 无…

Unity_Visual Effect Graph

Unity_Visual Effect Graph Unity可视化特效渲染虽不及Unreal Engine,然也还是吊打一众其他引擎的,粗浅整理一波吧,需要深入研究的点实在是太多了。 按照常规包管理方式安装Visual Effect Graph插件: 安装之后,示例文件夹中自带资源,拖入场景即可: 场景只是资源的显…

SOLIDWORKS Simulation 2024增强新功能

SOLIDWORKS 2024 新功能前瞻| SOLIDWORKS Simulation 功能增强 • 性能增强功能 • 壳体的接合交互 • 网格性能 • 欠约束实体检测 • 增强型轴承接头 • 收敛检查图解 • 去耦合混合自由体模式 • 复制算例时排除网格和结果 • 新增在网格化后及分析完成后自动保存模…

C++语法学习

一、字符串 1.字符与整数的联系--ASCII表 0~9 :48~57 A~Z:65~90 a~z:97~122 字符与数字之间转换: 1.1字符转数字&#xff1a; 字符转数字&#xff1a; char c A;cout << c-A << endl; //输出0cout << (int)c << endl; //输出…

Vue学习笔记14 --自定义hook函数/toRef/provide/inject等

9.自定义hook函数 什么是hook&#xff1f;—— 本质是一个函数&#xff0c;把setup函数中使用的Composition API进行了封装。 类似于vue2.x中的mixin。 自定义hook的优势: 复用代码, 让setup中的逻辑更清楚易懂。 10.toRef 作用&#xff1a;创建一个 ref 对象&#xff0c;其…

软件压力测试:探究其目的与重要性

随着软件应用在各行各业中的广泛应用&#xff0c;确保软件在高负载和极端条件下的稳定性变得至关重要。软件压力测试是一种验证系统在不同负载条件下的性能和稳定性的方法。本文将介绍软件压力测试的目的以及为什么它对软件开发和部署过程至关重要。 验证系统性能的极限&#x…

防火墙双向NAT配置

目录 拓扑需求 配置配置服务器映射配置NAT策略配置访问外网的NAT 配置安全策略 测试 拓扑 需求 分公司内部的客户端可以通过公网地址访问到内部的服务器 主要配置区域 配置 测试之前记得开启服务器的服务 配置服务器映射 配置NAT策略 源地址和目的地址同时转换 配置访问…

C++文件操作(2)

文件操作&#xff08;2&#xff09; 1.二进制模式读取文本文件2.使用二进制读写其他类型内容3.fstream类4.文件的随机存取文件指针的获取文件指针的移动 1.二进制模式读取文本文件 用二进制方式打开文本存储的文件时&#xff0c;也可以读取其中的内容&#xff0c;因为文本文件…

【Oracle云】OCI DevOps Services 构建自动化流水线 (2) - 创建 Build Pipeline CI 流水线

在软件开发的生命周期中&#xff0c;持续集成&#xff08;Continuous Integration, CI&#xff09;是确保团队协作、代码质量和交付效率的关键环节。 OCI DevOps Services 作为 Oracle 云原生 CI/CD 服务&#xff0c;为开发者提供了标准的CI/CD平台&#xff0c;支持构建自动化的…

Vue学习总结

声明&#xff1a;本文来源于黑马程序员PDF讲义 双向绑定&#xff1a; 修改表单项标签&#xff0c;发现vue对象data中的数据也发生了变化 双向绑定的作用&#xff1a;可以获取表单的数据的值&#xff0c;然后提交给服务器 事件绑定 v-on: 用来给html标签绑定事件的。需要注意…

Zookeeper分布式队列实战

目录 Zookeeper分布式队列 普通方式实现 设计思路 具体实现 使用Curator实现 具体实现 注意事项 Zookeeper分布式队列 常见的消息队列有:RabbitMQ&#xff0c;RocketMQ&#xff0c;Kafka等。Zookeeper作为一个分布式的小文件管理系统&#xff0c;同样能实现简单的队列功…

从零学习Linux操作系统 第二十三部分 系统中火墙的管理及优化

1 、实验环境设定 第一台主机需要两个网卡 另一台主机一个网卡桥接到VMnet0上 第一台主机保证能够和windows保持连接 设定第一块儿网卡能够与Windows连接 设定第二台主机能够与第一台主机连接 二、火墙中的基本名词及知识 火墙就相当于是一个表格&#xff0c;这个表格里写…

svn 安装路径

SVN客户端安装&#xff08;超详细&#xff09; 一、SVN客户端安装 1、下载安装包地址&#xff1a;https://tortoisesvn.net/downloads.html 此安装包是英文版的&#xff0c;还可以下载一个语言包&#xff0c;在同界面的下方 一直点击下一步&#xff0c;直到弹出选择红框 然…

3. Mybatis的XML配置文件(重点)

目录 1 Mybatis的XML配置文件 1.1 XML配置文件规范 1.2 XML配置文件实现 1.3 MybatisX的使用 2. Mybatis动态SQL 2.1 什么是动态SQL 2.2 动态SQL-if 2.2.1 条件查询 2.2.2更新 2.3 动态SQL-foreach 2.4 动态SQL-sql&include 1.mybatis入门 2.mybatis基本操作 1…

AI智能分析+明厨亮灶智慧管理平台助力“舌尖上的安全”

春节是中国最重要的传统节日之一&#xff0c;在春节期间&#xff0c;人们聚餐需求激增&#xff0c;餐饮业也迎来了高峰期。在这个时期&#xff0c;餐饮企业需要更加注重食品安全和卫生质量&#xff0c;以保证消费者的健康和权益&#xff0c;明厨亮灶智慧管理成为了餐饮业中备受…

基于单片机温度控制系统的研究

摘 要&#xff1a;笔者基于单片机的温度控制系统&#xff0c;从单片机选择、传感器选择、系统框架设计等方面概述了单片机的温度控制系统内涵&#xff0c;分析了其运行原理&#xff0c;列举了单片机温度控制系统设计的实操方法&#xff0c;从硬件系统、软件系统、温度检测方法…

springboot144基于mvc的高校办公室行政事务管理系统设计与实现

简介 【毕设源码推荐 javaweb 项目】基于springbootvue 的 适用于计算机类毕业设计&#xff0c;课程设计参考与学习用途。仅供学习参考&#xff0c; 不得用于商业或者非法用途&#xff0c;否则&#xff0c;一切后果请用户自负。 看运行截图看 第五章 第四章 获取资料方式 **项…

二叉搜索树操作题目:删除二叉搜索树中的结点

文章目录 题目标题和出处难度题目描述要求示例数据范围进阶 解法一思路和算法代码复杂度分析 解法二思路和算法代码复杂度分析 题目 标题和出处 标题&#xff1a;删除二叉搜索树中的结点 出处&#xff1a;450. 删除二叉搜索树中的结点 难度 5 级 题目描述 要求 给定二叉…