cost 92 ms
在另一个带有 mapstruct 的自定义映射器中使用自定义映射器(默认方法) - Use a custom mapper inside another custom mapper with mapstruct (in default method)

我想在 MapperA 的默认方法中使用 MapperB 类似于这个问题: How can I use another mapping from different class in mapstruct 然而 afaik 这个问题并没有要求“自定义映射器”,即作为自己的界面存在的映射器。 我怎么能 ...

@Autowired 在多模块应用程序中不起作用 - @Autowired not working in multi-module application

我需要@Autowire 数据库服务或存储库形成“游戏”模块中的“数据库”模块。 已经在主“应用程序”class 中添加了这些注释: 将它们添加到构造函数中要困难得多,因为我需要在 StrategySelector 中创建这些类的实例列表: 或者,对于 StrategySelector 逻辑,也许有 ...

扩展 JpaRepository 的存储库无法自动连接到我的服务中 - Repository that extends JpaRepository cannot be autowired into my Service

我有扩展 Jpa 存储库接口的 UserRepository 接口,当我试图将它自动连接到服务或 Controller 时,我收到这样的错误 - 我的项目结构以防万一 -单击用户资料库 - 服务 - 实体 - 如果它还不够回答我可以提供更多信息我是 Spring Boot 的新手,希望有人能提供帮助 ...

如何声明我的捆绑服务的参数 - How to declare parameters of a service of my bundle

我正在为几个 Symfony 项目创建一个包。 这个包包含一个服务,这个服务是用一个构造函数创建的,这个构造函数包含一个数组作为第一个和唯一的参数。 使用我的包的开发人员必须在config/properties.yaml文件中声明这个数组。 下面是如何加载config/properties.yaml ...

无法自动装配服务 ServiceEntityRepository 不存在此类服务。 API 平台下的 Symfony - Cannot autowire service ServiceEntityRepository no such service exists. Symfony under API Platform

我们正在使用 API 平台构建我们的应用程序,我们陷入了一个看起来与我们相关的环境的错误。 我们是 4 个开发人员,我们中的 3 个在 windows 下有同样的问题,而在 mac os 下的一个无法重现它并且一切正常。 我们正在与官方 docker 合作,我们都更新了它。 我已经尝试了我可以在谷 ...

使用 Spring Boot @Service 自动装配的通用类型反向查找 - Generic type reverse lookup with Spring Boot @Service autowirings

此处为 Spring Boot 和 Java 11。 我有一个抽象基类: 还有一些子类,比如: 但是除了这三个之外,它还有更多的子类。 我也有一个界面: 所以接口的每个实现都必须指定它所操作的AbstractBurninator子类。 因此我有: public class DoesFizzThing ...

没有可用类型的合格 bean:预计至少有 1 个 bean 有资格作为自动装配候选者 - No qualifying bean of type available: expected at least 1 bean which qualifies as autowire candidate

我正在学习 Spring 依赖注入,为此我编写了一些简单的代码,但我经常遇到这个错误: 谁能指出我正确的方向? 谢谢! 服务.java Controller.java SpringTest2Application.java 我尝试了 @Component 和 @Autowired 注释的不同组合 ...

Spring 引导自动装配不工作。 必需的 bean,类型找不到 - Spring Boot autowire not working. Required bean, of type that could not found

在 spring 引导中使用 autowire 时出现以下错误 自动装配,来自 ServiceImpl class,调用 controller 我的存储库界面: 服务接口: ` 主 class:` 我的 pom.xml 依赖项: 我的项目结构我已经尝试了一切。 这些类的顺序肯定是正确的,它们位于 ...

如何在 Symfony54 php81 应用程序中将 env VARS 注入抽象 class - How to inject env VARS into abstract class in a Symfony54 php81 app

我最近着手升级一个旧的 Symfony 4.4 应用程序(到 5.4 和 PHP 8.1)并且一直在关注 symfonycasts.com 上的精彩教程。 我已经到了我不明白如何前进的地步。 服务.yaml: .env.本地: TO_INJECT=astringgoeshere 当我尝试执行代码 ...

Java - 初始化自动装配服务的正确方法 - Java - Proper Way To Initialize an Autowired Service

我继承了一个springboot应用。 此应用程序具有类似于以下内容的服务: , 此服务是从另一个类似于以下的服务自动装配的; ,最后,springboot app类似如下。 一旦 Kafka 主题有一条消息,就会调用 listen() 方法(Kafka 只在这里相关,因为它启动了自动装配服务的 ...

使用相同的配置属性在 ConfigurationProperties class 中声明 bean - Declaring beans inside a ConfigurationProperties class, using the same configuration property

我有一个名为UserData的 java class,它有一个名为users的字段,我正在通过使用@ConfigurationProperties注释从我的 spring-boot 应用application.yml中的 application.yml 读取它。 在这个 class 中,我想声明另 ...

Java Spring:自动装配基于同一属性值的接口实现 class - Java Spring: Autowire an implementation of an interface based on the value of a property in the same class

我有2节课 PricingStrategy是一个具有 1 个方法和 2 个实现的接口: 我想使用依赖注入根据 class VehicleType中vehicleType的值将PricingStrategyA或PricingStrategyB自动装配到Vehicle class 中。 在伪代码中: ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM