SpringClound项目相关

news2024/9/20 7:52:25

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.coloradmin.cn/o/1422216.html

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

相关文章

高精度加法模板,包装结构体

本题链接:用户登录 题目: 样例: 输入 123 456 输出 579 模板结构体: struct BigInt {string values;inline BigInt Add(const BigInt &ta,const BigInt &tb){BigInt ans;ans.values "";string sa ta.values…

ETL怎么实现文件处理

在现代企业及各类组织的日常运作中,数据作为一种关键的信息资源,其管理和分析能力直接影响到决策效率与准确性。文件作为数据的主要载体,承载着从运营报告、客户记录、交易明细等各种类型的数据信息。这些海量且多样的文件数据在未经处理的情…

道理都懂,就是做不到,怎么办?

世界上最遥远的距离是什么? 我想,对许多人来说,多半是「知」与「行」之间的距离。 想一想,你有多少次发出感叹:这些我都知道,但我就是做不到,怎么办呢? 有多少次,你反复告…

matlab自定义函数实现图像小波变换

matlab中提供了小波变换函数lwt和ilwt,可以方便地实现提升小波变换。 我们按照小波变换的定义,粗糙地实现一个针对图像的小波变换,如下: % 使用方法: img imread(lena256.bmp); % 假设lena.png是灰度图像 subplot(2…

dom监听元素 从display: none到页面中

其实业务中还是会碰见这样的需求的,特别是一些框架内不,这个并不是很复杂,我们可以考虑如何去监听到 dom元素样式属性的变化就可以 很多童鞋可能对原生js的不够熟悉,现在大多数同学 只要会写简单的vue操作 就可以 做一些基础的前…

华为配置在用户物理位置变化时部署业务随行示例(V200R006C00、V200R007C00、V200R008C00)

配置在用户物理位置变化时部署业务随行示例(V200R006C00、V200R007C00、V200R008C00) 业务随行简介配置注意事项组网需求需求分析数据规划配置思路操作步骤配置文件 组网图形 图1 组网图 业务随行简介配置注意事项组网需求需求分析数据规划配置思路操作步…

【Time Series】LSTM代码实战

一、简介 还是那句话,"时间序列金融"是一个很有"钱"景的话题,还是想尝试采用Stock时间序列预测任务DeepLearning。本文提供了LSTM预测股票的源代码。 二、算法原理 长短期记忆网络(LSTM)是一种特殊的循环神经…

瑞士0.5米高程地形瓦片数据介绍

一、背景 瑞士是位于中欧的一个国家,以其美丽的自然风光、高质量的生活和强大的金融体系而闻名,其位于欧洲中部,四面环山,与德国、法国、意大利、奥地利和列支敦士登等国家接壤。瑞士境内有许多湖泊和阿尔卑斯山脉的一部分。瑞士…

Redis常见数据类型[上]

目录 前言: 基本全局命令 KEYS EXISTS DEL EXPIRE TTL TYPE 数据结构和内部编码 内部编码: 单线程架构 引出单线程模型: 为什么单线程还这么快? String字符串 字符串数据类型: 常见命令: S…

uniapp微信小程序-分包

一、为什么要分包 微信小程序每个分包的大小是2M,总体积一共不能超过20M,当然你也可以提升启动速度,降低首次加载时间,模块化开发,按需加载,提高性能。 二、分包步骤 1.首先在 mainfest.json mp-weixin添加以下代码&a…

用Python库pillow处理图像

入门知识 颜色。如果你有使用颜料画画的经历,那么一定知道混合红、黄、蓝三种颜料可以得到其他的颜色,事实上这三种颜色就是美术中的三原色,它们是不能再分解的基本颜色。在计算机中,我们可以将红、绿、蓝三种色光以不同的比例叠加…

Git快速入门+常用指令

Git创建本地仓库 1、创建一个文件夹,右键选择Git Bash Here 2、选择下列其中一个方法 方法一:创建初始化仓库 git init 方法二:克隆远程仓库 git clone [url] IDEA集成Git 按步骤操作会自动创建本地仓库 上传步骤 1、提交 2、输入上…

客户端熔断器基于golang Grpc具体实现

目录 前言 一、什么是Google SRE 二、Google SRE 熔断器的工作流程: 三、Google SRE GRPC 代码实现 四、测试用例 大家可以关注个人博客:xingxing – Web Developer from Somewhere 有关后端问题探讨 前言 当某个用户超过资源配额时&#xff0c…

EPSON RC 机器人-第一个程序

创建项目 有机械人且用USB线连接好。可以USB。没有真机的选择 C4 Sample 可以运行程序。 否刚会提示【不能连接到控制器,未安装USB驱动器】 代码 按F5打开运行窗口 再点【开始】 点 【是】,查看运行结果

分布式ID介绍实现方案总结

分布式 ID 介绍 什么是 ID? 日常开发中,我们需要对系统中的各种数据使用 ID 唯一表示,比如用户 ID 对应且仅对应一个人,商品 ID 对应且仅对应一件商品,订单 ID 对应且仅对应一个订单。 我们现实生活中也有各种 ID&…

[BUUCTF]-Web:[GXYCTF2019]Ping Ping Ping解析

先看网页 按照正常流程&#xff0c;先ipls&#xff0c;可以看到flag 但是不能直接得flag&#xff0c;他应该是过滤掉了一点东西。 这里考虑过滤掉了空格 空格过滤绕过&#xff1a; %20 %09 ${IFS} $IFS$1 {IFS} < <> 空格绕过之后发现还是打不开flag.php,但报错语句…

【Vue】二、Vue 组件展示控制的优雅解决方案

vue项目中展示的组件&#xff0c;我平常都是通过v-show进行展示控制&#xff0c;类似这样 通常情况下&#xff0c;一个正常展示组件的流程&#xff0c;是通过前端用户点击触发函数&#xff0c;在函数中对data数据进行操作&#xff0c;从而展示不同的页面 showWork: false, sho…

ansible 常用命令 基本说明 个人备忘

linux下设置一台机器的名称为ansible hostnamectl set-hostname ansible //设置一台机器的名称为master-01 hostnamectl set-hostname master-01 hostnamectl set-hostname master-02 hostnamectl set-hostname node01 hostnamectl set-hostname node02 hostnamectl set-…

仅2个月就实现37家门店自动化覆盖100%的集团公司,到底做对了啥?

在各种AI技术不断被广泛运用于各大企业数字化转型的2024年&#xff0c;有这样一家拥有全国数百家汽车销售门店的500强集团公司&#xff0c;在迎接不断激增门店业务量的同时&#xff0c;持续探索能够确保数百家门店准确、高效运转&#xff0c;并努力将客户满意度维持在一个较高水…