JSR-330 ‘javax.inject.Inject‘ annotation found and supported for autowiring

简介: 这篇文章讨论了在Spring Boot项目中遇到的JSR-330 `javax.inject.Inject`注解相关问题,以及如何解决因版本不兼容导致服务注册失败的问题。

前言

在运行分布式微服务项目的时候,报的一个错。nacos中也没有注册成功单个微服务。什么问题都能给我遇到、就是版本问题、查看SpringBoot和SpringCloud的版本。gitbug上搜了看看,就是版本问题

搜索

在这里插入图片描述
在这里插入图片描述

解决

在pom文件中修改版本信息
在这里插入图片描述

成功启动
在这里插入图片描述

相关文章
|
9月前
Error:(56, 18) 错误: com.newCallblack.callshow.util.DownloadUtil cannot be provided without an @Inject
Error:(56, 18) 错误: com.newCallblack.callshow.util.DownloadUtil cannot be provided without an @Inject
36 0
|
Web App开发 XML Java
java.lang.IllegalStateException: Async support must be enabled on a servlet and for all filters invo
Spring MVC 项目在使用 DeferredResult 实现异步接口时出现错误。 完整错误信息如下: 十一月 03, 2017 8:59:53 上午 org.apache.catalina.
2394 0
|
5月前
|
Java
flyway报错SLF4J: No SLF4J providers were found.或者SLF4J: Defaulting to no-operation (NOP) logger implem
flyway报错SLF4J: No SLF4J providers were found.或者SLF4J: Defaulting to no-operation (NOP) logger implem
205 1
|
7月前
|
设计模式 JavaScript
inject
【7月更文挑战第17天】
133 15
|
设计模式 Java 测试技术
【注解使用】使用@Autowired注解警告Field injection is not recommended
【注解使用】使用@Autowired注解警告Field injection is not recommended
451 0
|
Java
springboot3 解决:Could not autowire. No beans of ‘JavaMailSender‘ type found
因为 spring-boot-starter-mail 默认使用某些包发生了变化,在 2.2.xx 版本前后不一,解决对应bug
540 0
|
前端开发
SpringMVC - Failed to instantiate Specified class is an interface
SpringMVC - Failed to instantiate Specified class is an interface
601 0
|
Java Spring
SpringBoot中@ConfigurationProperties提示:Configuration Annotation Processor not found in classpath
SpringBoot中@ConfigurationProperties提示:Configuration Annotation Processor not found in classpath
432 0
|
XML 前端开发 Java
No qualifying bean of type 'com.frankxulei.service.UserService' available: expected at least 1 bean which qualifies as autowire candidate
Java Spring MVC 5 使用MyBatis连接池异常: 错误信息:No qualifying bean of type 'com.frankxulei.service.UserService' available: expected at least 1 bean which qualifies as autowire candidate.
14723 0