Сообщение об ошибке:
java.lang.IllegalStateException: Failed to load ApplicationContext for [WebMergedContextConfiguration@6da648c5 testClass = ru.sbrf.llt.autotests.testing.service.T5196Test, locations = [], classes = [ru.sbrf.llt.autotest.Application], contextInitializerClasses = [], activeProfiles = [], propertySourceLocations = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true"], contextCustomizers = [org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@63e5b8aa, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@3f6cce7f, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@2407a36c, org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@44dfdd58, org.springframework.boot.test.context.SpringBootTestAnnotation@f590c3b4], resourceBasePath = "src/main/webapp", contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, p a r e n t = n u l l ] < b r / > < b r / > a t o r g . s p r i n g f r a m e w o r k . t e s t . c o n t e x t . c a c h e . D e f a u l t C a c h e A w a r e C o n t e x t L o a d e r D e l e g a t e . l o a d C o n t e x t ( D e f a u l t C a c h e A w a r e C o n t e x t L o a d e r D e l e g a t e . j a v a : 1 4 2 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . t e s t . c o n t e x t . s u p p o r t . D e f a u l t T e s t C o n t e x t . g e t A p p l i c a t i o n C o n t e x t ( D e f a u l t T e s t C o n t e x t . j a v a : 1 2 7 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . t e s t . c o n t e x t . w e b . S e r v l e t T e s t E x e c u t i o n L i s t e n e r . s e t U p R e q u e s t C o n t e x t I f N e c e s s a r y ( S e r v l e t T e s t E x e c u t i o n L i s t e n e r . j a v a : 1 9 1 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . t e s t . c o n t e x t . w e b . S e r v l e t T e s t E x e c u t i o n L i s t e n e r . p r e p a r e T e s t I n s t a n c e ( S e r v l e t T e s t E x e c u t i o n L i s t e n e r . j a v a : 1 3 0 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . t e s t . c o n t e x t . T e s t C o n t e x t M a n a g e r . p r e p a r e T e s t I n s t a n c e ( T e s t C o n t e x t M a n a g e r . j a v a : 2 4 1 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . t e s t . c o n t e x t . j u n i t . j u p i t e r . S p r i n g E x t e n s i o n . p o s t P r o c e s s T e s t I n s t a n c e ( S p r i n g E x t e n s i o n . j a v a : 1 3 8 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . l a m b d a $ i n v o k e T e s t I n s t a n c e P o s t P r o c e s s o r s $ 1 0 ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 3 7 7 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . e x e c u t e A n d M a s k T h r o w a b l e ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 3 8 2 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . l a m b d a $ i n v o k e T e s t I n s t a n c e P o s t P r o c e s s o r s $ 1 1 ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 3 7 7 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . R e f e r e n c e P i p e l i n e $ 3 $ 1 . a c c e p t ( R e f e r e n c e P i p e l i n e . j a v a : 1 9 7 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . R e f e r e n c e P i p e l i n e $ 2 $ 1 . a c c e p t ( R e f e r e n c e P i p e l i n e . j a v a : 1 7 9 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . A r r a y L i s t $ A r r a y L i s t S p l i t e r a t o r . f o r E a c h R e m a i n i n g ( A r r a y L i s t . j a v a : 1 6 2 5 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . A b s t r a c t P i p e l i n e . c o p y I n t o ( A b s t r a c t P i p e l i n e . j a v a : 5 0 9 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . A b s t r a c t P i p e l i n e . w r a p A n d C o p y I n t o ( A b s t r a c t P i p e l i n e . j a v a : 4 9 9 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . S t r e a m S p l i t e r a t o r s $ W r a p p i n g S p l i t e r a t o r . f o r E a c h R e m a i n i n g ( S t r e a m S p l i t e r a t o r s . j a v a : 3 1 0 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . S t r e a m s $ C o n c a t S p l i t e r a t o r . f o r E a c h R e m a i n i n g ( S t r e a m s . j a v a : 7 3 5 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . S t r e a m s $ C o n c a t S p l i t e r a t o r . f o r E a c h R e m a i n i n g ( S t r e a m s . j a v a : 7 3 4 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . R e f e r e n c e P i p e l i n e $ H e a d . f o r E a c h ( R e f e r e n c e P i p e l i n e . j a v a : 7 6 2 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . i n v o k e T e s t I n s t a n c e P o s t P r o c e s s o r s ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 3 7 6 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . l a m b d a $ i n s t a n t i a t e A n d P o s t P r o c e s s T e s t I n s t a n c e $ 6 ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 2 8 9 ) < b r / > a t o r g . j u n i t . p l a t f o r m . e n g i n e . s u p p o r t . h i e r a r c h i c a l . T h r o w a b l e C o l l e c t o r . e x e c u t e ( T h r o w a b l e C o l l e c t o r . j a v a : 7 3 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . i n s t a n t i a t e A n d P o s t P r o c e s s T e s t I n s t a n c e ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 2 8 8 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . l a m b d a $ t e s t I n s t a n c e s P r o v i d e r $ 4 ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 2 7 8 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . O p t i o n a l . o r E l s e G e t ( O p t i o n a l . j a v a : 3 6 4 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . l a m b d a $ t e s t I n s t a n c e s P r o v i d e r $ 5 ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 2 7 7 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . e x e c u t i o n . T e s t I n s t a n c e s P r o v i d e r . g e t T e s t I n s t a n c e s ( T e s t I n s t a n c e s P r o v i d e r . j a v a : 3 1 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . T e s t M e t h o d T e s t D e s c r i p t o r . l a m b d a $ p r e p a r e $ 0 ( T e s t M e t h o d T e s t D e s c r i p t o r . j a v a : 1 0 5 ) < b r / > a t o r g . j u n i t . p l a t f o r m . e n g i n e . s u p p o r t . h i e r a r c h i c a l . T h r o w a b l e C o l l e c t o r . e x e c u t e ( T h r o w a b l e C o l l e c t o r . j a v a : 7 3 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . T e s t M e t h o d T e s t D e s c riptor.prepare(TestMethodTestDescriptor.java:104)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:68)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'catalogDaoService' defined in file [C:\Work\catalog-autotest-new\target\classes\ru\sbrf\llt\autotest\service\dao\CatalogDaoService.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'cardRepository' defined in ru.sbrf.llt.autotest.service.repository.CardRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: org/springframework/data/jpa/repository/support/SimpleJpaRepository$AjcClosure79
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1189)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:560)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:941)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:608)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:733)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:435)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:311)
at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137)
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58)
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46)
at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1405)
at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:545)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:184)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:118)
... 72 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cardRepository' defined in ru.sbrf.llt.autotest.service.repository.CardRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: org/springframework/data/jpa/repository/support/SimpleJpaRepository$AjcClosure79
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:598)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1417)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:888)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
... 96 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/data/jpa/repository/support/SimpleJpaRepository$AjcClosure79
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3373)
at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2555)
at org.springframework.data.util.ReflectionUtils.findConstructor(ReflectionUtils.java:258)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.instantiateClass(RepositoryFactorySupport.java:569)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getTargetRepositoryViaReflection(RepositoryFactorySupport.java:536)
at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:212)
at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:194)
at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:81)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:317)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$5(RepositoryFactoryBeanSupport.java:279)
at org.springframework.data.util.Lazy.getNullable(Lazy.java:245)
at org.springframework.data.util.Lazy.get(Lazy.java:114)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:285)
at org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:132)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1816)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1766)
... 107 more
Caused by: java.lang.ClassNotFoundException: org.springframework.data.jpa.repository.support.SimpleJpaRepository$AjcClosure79
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
... 124 more
Мой каталогDaoService.java:
@Getter
@RequiredArgsConstructor
@Component
public class CatalogDaoService {
private final CardRepository cardRepository;
}
CardRepository.java
@Repository
public interface CardRepository extends JpaRepository{
@Query("select card from Card card where card.dpan in (:pans)")
List getCardsByPans(List pans);
}
Card.java
@Getter
@Setter
@Entity
@Table(name = "CARD")
@NoArgsConstructor
@ToString
@DynamicInsert
public class Card extends AbstractCard {
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "s_card")
@SequenceGenerator(
name = "s_card",
sequenceName = "s_card",
allocationSize = 100
)
private Long id;
@Column(name = "id_card_line", updatable = false)
private Long idCardLine;
@Column(name = "event_time")
private ZonedDateTime eventTime;
@OneToMany(mappedBy = "card", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@Fetch(FetchMode.JOIN)
private Set tokenInfoList = new HashSet();
}
Также я создал класс конфигурации для JPA:
@Configuration
@EnableJpaRepositories(
basePackages = "ru.sbrf.llt.autotest.service.repository",
entityManagerFactoryRef = "catalogEntityManager",
transactionManagerRef = "catalogTransactionManager"
)
public class CatalogStorageConfiguration {
@Value("${spring.datasource.dialect}")
private String dialect;
@Value("${spring.datasource.hbm2ddl}")
private String hbm2ddl;
@Bean
@ConfigurationProperties("spring.datasource")
public DataSource catalogDatasourceProp() {
return DataSourceBuilder.create().build();
}
@Bean(name = "catalogTemplate")
public JdbcTemplate catalogJdbcTemplate(@Qualifier("catalogDatasourceProp") DataSource ds) {
return new JdbcTemplate(ds);
}
@Bean
public LocalContainerEntityManagerFactoryBean catalogEntityManager(
@Qualifier("catalogDatasourceProp") DataSource dataSource
) throws Exception {
LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource);
em.setPackagesToScan("ru.sbrf.llt.autotest.service.repository");
HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
em.setJpaVendorAdapter(vendorAdapter);
HashMap properties = new HashMap();
properties.put("hibernate.dialect", dialect);
properties.put("hibernate.default_schema", dataSource.getConnection().getSchema());
properties.put("hibernate.hbm2ddl.auto", hbm2ddl);
em.setJpaPropertyMap(properties);
return em;
}
@Bean
public PlatformTransactionManager catalogTransactionManager(
@Qualifier("catalogEntityManager") LocalContainerEntityManagerFactoryBean managerFactoryBean
) {
JpaTransactionManager transactionManager = new JpaTransactionManager();
transactionManager.setEntityManagerFactory(managerFactoryBean.getObject());
return transactionManager;
}
}
И когда я запускаю свой тестовый класс, я сталкиваюсь с вышеуказанной ошибкой
public class T5196Test extends TestBase {
@Test
void testAcceptEvents() throws Exception {
String jsonString = new String(Files.readAllBytes(Path.of("src/test/resources/files/T5196.json")));
Empty response = sendEvent(jsonString);
Assertions.assertEquals(Empty.getDefaultInstance(), response);
long count = catalogDaoService.getCardRepository().count();
Assertions.assertEquals(2, count);
}
}
Помогите, пожалуйста!
Ошибка UnsatisfiedDependencyException указывает на то, что Spring не может создать bean-компонент CatalogDaoService, поскольку он не может создать bean-компонент CardRepository. Это может быть вызвано несколькими проблемами, включая неправильную конфигурацию Spring Data JPA или отсутствие зависимостей. Я проверил все свои классы и так и не понял.
UPD: добавлен pom.xml
& l t ; p r o j e c t x m l n s = & q u o t ; h t t p : / / m a v e n . a p a c h e . o r g / P O M / 4 . 0 . 0 & q u o t ; < b r / > x m l n s : x s i = & q u o t ; h t t p : / / w w w . w 3 . o r g / 2 0 0 1 / X M L S c h e m a - i n s t a n c e & q u o t ; < b r / > x s i : s c h e m a L o c a t i o n = & q u o t ; h t t p : / / m a v e n . a p a c h e . o r g / P O M / 4 . 0 . 0 h t t p : / / m a v e n . a p a c h e . o r g / x s d / m a v e n - 4 . 0 . 0 . x s d & q u o t ; & g t ; < b r / > & l t ; m o d e l V e r s i o n & g t ; 4 . 0 . 0 & l t ; / m o d e l V e r s i o n & g t ; < b r / > < b r / > & l t ; p a r e n t & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - p a r e n t & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 3 . 1 . 0 & l t ; / v e r s i o n & g t ; < b r / > & l t ; / p a r e n t & g t ; < b r / > < b r / > & l t ; p r o p e r t i e s & g t ; < b r / > & l t ; m a v e n . c o m p i l e r . s o u r c e & g t ; 1 7 & l t ; / m a v e n . c o m p i l e r . s o u r c e & g t ; < b r / > & l t ; m a v e n . c o m p i l e r . t a r g e t & g t ; 1 7 & l t ; / m a v e n . c o m p i l e r . t a r g e t & g t ; < b r / > & l t ; p r o j e c t . b u i l d . s o u r c e E n c o d i n g & g t ; U T F - 8 & l t ; / p r o j e c t . b u i l d . s o u r c e E n c o d i n g & g t ; < b r / > & l t ; l o g 4 . v e r s i o n & g t ; 2 . 2 0 . 0 & l t ; / l o g 4 . v e r s i o n & g t ; < b r / > & l t ; a s p e c t j . v e r s i o n & g t ; 1 . 9 . 1 9 & l t ; / a s p e c t j . v e r s i o n & g t ; < b r / > & l t ; m a v e n - s u r e f i r e - p l u g i n . v e r s i o n & g t ; 3 . 0 . 0 - M 5 & l t ; / m a v e n - s u r e f i r e - p l u g i n . v e r s i o n & g t ; < b r / > & l t ; / p r o p e r t i e s & g t ; < b r / > < b r / > & l t ; d e p e n d e n c i e s & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; c o m . g o o g l e . c o d e . g s o n & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; g s o n & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 2 . 1 0 . 1 & l t ; / v e r s i o n & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; e x c l u s i o n s & g t ; < b r / > & l t ; e x c l u s i o n & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - l o g g i n g & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; / e x c l u s i o n & g t ; < b r / > & l t ; / e x c l u s i o n s & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . k a f k a & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - k a f k a & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; e x c l u s i o n s & g t ; < b r / > & l t ; e x c l u s i o n & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - l o g g i n g & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; / e x c l u s i o n & g t ; < b r / > & l t ; / e x c l u s i o n s & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; i o . g i t h u b . l o g n e t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; g r p c - s p r i n g - b o o t - s t a r t e r & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 5 . 1 . 5 & l t ; / v e r s i o n & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . a p a c h e . t o m c a t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; a n n o t a t i o n s - a p i & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 6 . 0 . 5 3 & l t ; / v e r s i o n & g t ; < b r / > & l t ; s c o p e & g t ; p r o v i d e d & l t ; / s c o p e & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > < b r / > < b r / > < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . a p a c h e . l o g g i n g . l o g 4 j & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; l o g 4 j - s l f 4 j 2 - i m p l & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 2 . 2 1 . 1 & l t ; / v e r s i o n & g t ; < b r / > & l t ; s c o p e & g t ; t e s t & l t ; / s c o p e & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . p o s t g r e s q l & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; p o s t g r e s q l & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 4 2 . 6 . 0 & l t ; / v e r s i o n & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - t e s t & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; e x c l u s i o n s & g t ; < b r / > & l t ; e x c l u s i o n & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - l o g g i n g & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; / e x c l u s i o n & g t ; < b r / > & l t ; / e x c l u s i o n s & g t ; < b r / > & l t ; s c o p e & g t ; t e s t & l t ; / s c o p e & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; i o . f a b r i c 8 & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; o p e n s h i f t - c l i e n t & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 6 . 5 . 1 & l t ; / v e r s i o n & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; i o . q a m e t a . a l l u r e & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; a l l u r e - j u n i t 5 & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 2 . 2 0 . 1 & l t ; / v e r s i o n & g t ; < b r / > & l t ; s c o p e & g t ; t e s t & l t ; / s c o p e & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . p r o j e c t l o m b o k & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; l o m b o k & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . j a c o c o & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; o r g . j a c o c o . a g e n t & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; c l a s s i f i e r & g t ; r u n t i m e & l t ; / c l a s s i f i e r & g t ; < b r / > & l t ; v e r s i o n & g t ; 0 . 8 . 1 2 & l t ; / v e r s i o n & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - w e b & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; e x c l u s i o n s & g t ; < b r / > & l t ; e x c l u s i o n & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - l o g g i n g & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; / e x c l u s i o n & g t ; < b r / > & l t ; / e x c l u s i o n s & g t ; < b r / > & l t ; / dependency>
org.springframework.boot
spring-boot-starter-data-jpa
org.springframework.boot
spring-boot-starter-logging
org.xolstice.maven.plugins
protobuf-maven-plugin
0.5.1
com.google.protobuf:protoc:3.5.1-1:exe:${os.detected.classifier}
grpc-java
io.grpc:protoc-gen-grpc-java:1.17.1:exe:${os.detected.classifier}
compile
compile-custom
org.apache.maven.plugins
maven-surefire-plugin
${maven-surefire-plugin.version}
false
-Dfile.encoding=${project.build.sourceEncoding}
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
junit.jupiter.extensions.autodetection.enabled
true
allure.results.directory
${project.build.directory}/allure-results
org.aspectj
aspectjweaver
${aspectj.version}
org.junit.jupiter
junit-jupiter-engine
5.8.1
io.qameta.allure
allure-maven
2.12.0
target/allure-report
target/site
kr.motd.maven
os-maven-plugin
1.6.2
Подробнее здесь: https://stackoverflow.com/questions/790 ... ncy-expres
Ошибка создания bean-компонента с именем «catalogDaoService». Неудовлетворенная зависимость, выраженная через параметр к ⇐ JAVA
Программисты JAVA общаются здесь
1729000532
Anonymous
Сообщение об ошибке:
java.lang.IllegalStateException: Failed to load ApplicationContext for [WebMergedContextConfiguration@6da648c5 testClass = ru.sbrf.llt.autotests.testing.service.T5196Test, locations = [], classes = [ru.sbrf.llt.autotest.Application], contextInitializerClasses = [], activeProfiles = [], propertySourceLocations = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true"], contextCustomizers = [org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@63e5b8aa, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@3f6cce7f, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@2407a36c, org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@44dfdd58, org.springframework.boot.test.context.SpringBootTestAnnotation@f590c3b4], resourceBasePath = "src/main/webapp", contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, p a r e n t = n u l l ] < b r / > < b r / > a t o r g . s p r i n g f r a m e w o r k . t e s t . c o n t e x t . c a c h e . D e f a u l t C a c h e A w a r e C o n t e x t L o a d e r D e l e g a t e . l o a d C o n t e x t ( D e f a u l t C a c h e A w a r e C o n t e x t L o a d e r D e l e g a t e . j a v a : 1 4 2 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . t e s t . c o n t e x t . s u p p o r t . D e f a u l t T e s t C o n t e x t . g e t A p p l i c a t i o n C o n t e x t ( D e f a u l t T e s t C o n t e x t . j a v a : 1 2 7 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . t e s t . c o n t e x t . w e b . S e r v l e t T e s t E x e c u t i o n L i s t e n e r . s e t U p R e q u e s t C o n t e x t I f N e c e s s a r y ( S e r v l e t T e s t E x e c u t i o n L i s t e n e r . j a v a : 1 9 1 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . t e s t . c o n t e x t . w e b . S e r v l e t T e s t E x e c u t i o n L i s t e n e r . p r e p a r e T e s t I n s t a n c e ( S e r v l e t T e s t E x e c u t i o n L i s t e n e r . j a v a : 1 3 0 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . t e s t . c o n t e x t . T e s t C o n t e x t M a n a g e r . p r e p a r e T e s t I n s t a n c e ( T e s t C o n t e x t M a n a g e r . j a v a : 2 4 1 ) < b r / > a t o r g . s p r i n g f r a m e w o r k . t e s t . c o n t e x t . j u n i t . j u p i t e r . S p r i n g E x t e n s i o n . p o s t P r o c e s s T e s t I n s t a n c e ( S p r i n g E x t e n s i o n . j a v a : 1 3 8 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . l a m b d a $ i n v o k e T e s t I n s t a n c e P o s t P r o c e s s o r s $ 1 0 ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 3 7 7 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . e x e c u t e A n d M a s k T h r o w a b l e ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 3 8 2 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . l a m b d a $ i n v o k e T e s t I n s t a n c e P o s t P r o c e s s o r s $ 1 1 ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 3 7 7 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . R e f e r e n c e P i p e l i n e $ 3 $ 1 . a c c e p t ( R e f e r e n c e P i p e l i n e . j a v a : 1 9 7 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . R e f e r e n c e P i p e l i n e $ 2 $ 1 . a c c e p t ( R e f e r e n c e P i p e l i n e . j a v a : 1 7 9 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . A r r a y L i s t $ A r r a y L i s t S p l i t e r a t o r . f o r E a c h R e m a i n i n g ( A r r a y L i s t . j a v a : 1 6 2 5 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . A b s t r a c t P i p e l i n e . c o p y I n t o ( A b s t r a c t P i p e l i n e . j a v a : 5 0 9 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . A b s t r a c t P i p e l i n e . w r a p A n d C o p y I n t o ( A b s t r a c t P i p e l i n e . j a v a : 4 9 9 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . S t r e a m S p l i t e r a t o r s $ W r a p p i n g S p l i t e r a t o r . f o r E a c h R e m a i n i n g ( S t r e a m S p l i t e r a t o r s . j a v a : 3 1 0 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . S t r e a m s $ C o n c a t S p l i t e r a t o r . f o r E a c h R e m a i n i n g ( S t r e a m s . j a v a : 7 3 5 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . S t r e a m s $ C o n c a t S p l i t e r a t o r . f o r E a c h R e m a i n i n g ( S t r e a m s . j a v a : 7 3 4 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . s t r e a m . R e f e r e n c e P i p e l i n e $ H e a d . f o r E a c h ( R e f e r e n c e P i p e l i n e . j a v a : 7 6 2 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . i n v o k e T e s t I n s t a n c e P o s t P r o c e s s o r s ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 3 7 6 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . l a m b d a $ i n s t a n t i a t e A n d P o s t P r o c e s s T e s t I n s t a n c e $ 6 ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 2 8 9 ) < b r / > a t o r g . j u n i t . p l a t f o r m . e n g i n e . s u p p o r t . h i e r a r c h i c a l . T h r o w a b l e C o l l e c t o r . e x e c u t e ( T h r o w a b l e C o l l e c t o r . j a v a : 7 3 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . i n s t a n t i a t e A n d P o s t P r o c e s s T e s t I n s t a n c e ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 2 8 8 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . l a m b d a $ t e s t I n s t a n c e s P r o v i d e r $ 4 ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 2 7 8 ) < b r / > a t j a v a . b a s e / j a v a . u t i l . O p t i o n a l . o r E l s e G e t ( O p t i o n a l . j a v a : 3 6 4 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . C l a s s B a s e d T e s t D e s c r i p t o r . l a m b d a $ t e s t I n s t a n c e s P r o v i d e r $ 5 ( C l a s s B a s e d T e s t D e s c r i p t o r . j a v a : 2 7 7 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . e x e c u t i o n . T e s t I n s t a n c e s P r o v i d e r . g e t T e s t I n s t a n c e s ( T e s t I n s t a n c e s P r o v i d e r . j a v a : 3 1 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . T e s t M e t h o d T e s t D e s c r i p t o r . l a m b d a $ p r e p a r e $ 0 ( T e s t M e t h o d T e s t D e s c r i p t o r . j a v a : 1 0 5 ) < b r / > a t o r g . j u n i t . p l a t f o r m . e n g i n e . s u p p o r t . h i e r a r c h i c a l . T h r o w a b l e C o l l e c t o r . e x e c u t e ( T h r o w a b l e C o l l e c t o r . j a v a : 7 3 ) < b r / > a t o r g . j u n i t . j u p i t e r . e n g i n e . d e s c r i p t o r . T e s t M e t h o d T e s t D e s c riptor.prepare(TestMethodTestDescriptor.java:104)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:68)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'catalogDaoService' defined in file [C:\Work\catalog-autotest-new\target\classes\ru\sbrf\llt\autotest\service\dao\CatalogDaoService.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'cardRepository' defined in ru.sbrf.llt.autotest.service.repository.CardRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: org/springframework/data/jpa/repository/support/SimpleJpaRepository$AjcClosure79
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1189)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:560)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:941)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:608)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:733)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:435)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:311)
at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137)
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58)
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46)
at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1405)
at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:545)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:184)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:118)
... 72 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cardRepository' defined in ru.sbrf.llt.autotest.service.repository.CardRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: org/springframework/data/jpa/repository/support/SimpleJpaRepository$AjcClosure79
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:598)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1417)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:888)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
... 96 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/data/jpa/repository/support/SimpleJpaRepository$AjcClosure79
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3373)
at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2555)
at org.springframework.data.util.ReflectionUtils.findConstructor(ReflectionUtils.java:258)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.instantiateClass(RepositoryFactorySupport.java:569)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getTargetRepositoryViaReflection(RepositoryFactorySupport.java:536)
at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:212)
at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:194)
at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:81)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:317)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$5(RepositoryFactoryBeanSupport.java:279)
at org.springframework.data.util.Lazy.getNullable(Lazy.java:245)
at org.springframework.data.util.Lazy.get(Lazy.java:114)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:285)
at org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:132)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1816)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1766)
... 107 more
Caused by: java.lang.ClassNotFoundException: org.springframework.data.jpa.repository.support.SimpleJpaRepository$AjcClosure79
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
... 124 more
Мой каталогDaoService.java:
@Getter
@RequiredArgsConstructor
@Component
public class CatalogDaoService {
private final CardRepository cardRepository;
}
CardRepository.java
@Repository
public interface CardRepository extends JpaRepository{
@Query("select card from Card card where card.dpan in (:pans)")
List getCardsByPans(List pans);
}
Card.java
@Getter
@Setter
@Entity
@Table(name = "CARD")
@NoArgsConstructor
@ToString
@DynamicInsert
public class Card extends AbstractCard {
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "s_card")
@SequenceGenerator(
name = "s_card",
sequenceName = "s_card",
allocationSize = 100
)
private Long id;
@Column(name = "id_card_line", updatable = false)
private Long idCardLine;
@Column(name = "event_time")
private ZonedDateTime eventTime;
@OneToMany(mappedBy = "card", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@Fetch(FetchMode.JOIN)
private Set tokenInfoList = new HashSet();
}
Также я создал класс конфигурации для JPA:
@Configuration
@EnableJpaRepositories(
basePackages = "ru.sbrf.llt.autotest.service.repository",
entityManagerFactoryRef = "catalogEntityManager",
transactionManagerRef = "catalogTransactionManager"
)
public class CatalogStorageConfiguration {
@Value("${spring.datasource.dialect}")
private String dialect;
@Value("${spring.datasource.hbm2ddl}")
private String hbm2ddl;
@Bean
@ConfigurationProperties("spring.datasource")
public DataSource catalogDatasourceProp() {
return DataSourceBuilder.create().build();
}
@Bean(name = "catalogTemplate")
public JdbcTemplate catalogJdbcTemplate(@Qualifier("catalogDatasourceProp") DataSource ds) {
return new JdbcTemplate(ds);
}
@Bean
public LocalContainerEntityManagerFactoryBean catalogEntityManager(
@Qualifier("catalogDatasourceProp") DataSource dataSource
) throws Exception {
LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource);
em.setPackagesToScan("ru.sbrf.llt.autotest.service.repository");
HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
em.setJpaVendorAdapter(vendorAdapter);
HashMap properties = new HashMap();
properties.put("hibernate.dialect", dialect);
properties.put("hibernate.default_schema", dataSource.getConnection().getSchema());
properties.put("hibernate.hbm2ddl.auto", hbm2ddl);
em.setJpaPropertyMap(properties);
return em;
}
@Bean
public PlatformTransactionManager catalogTransactionManager(
@Qualifier("catalogEntityManager") LocalContainerEntityManagerFactoryBean managerFactoryBean
) {
JpaTransactionManager transactionManager = new JpaTransactionManager();
transactionManager.setEntityManagerFactory(managerFactoryBean.getObject());
return transactionManager;
}
}
И когда я запускаю свой тестовый класс, я сталкиваюсь с вышеуказанной ошибкой
public class T5196Test extends TestBase {
@Test
void testAcceptEvents() throws Exception {
String jsonString = new String(Files.readAllBytes(Path.of("src/test/resources/files/T5196.json")));
Empty response = sendEvent(jsonString);
Assertions.assertEquals(Empty.getDefaultInstance(), response);
long count = catalogDaoService.getCardRepository().count();
Assertions.assertEquals(2, count);
}
}
Помогите, пожалуйста!
Ошибка [b]UnsatisfiedDependencyException[/b] указывает на то, что Spring не может создать bean-компонент CatalogDaoService, поскольку он не может создать bean-компонент CardRepository. Это может быть вызвано несколькими проблемами, включая неправильную конфигурацию Spring Data JPA или отсутствие зависимостей. Я проверил все свои классы и так и не понял.
UPD: добавлен pom.xml
& l t ; p r o j e c t x m l n s = & q u o t ; h t t p : / / m a v e n . a p a c h e . o r g / P O M / 4 . 0 . 0 & q u o t ; < b r / > x m l n s : x s i = & q u o t ; h t t p : / / w w w . w 3 . o r g / 2 0 0 1 / X M L S c h e m a - i n s t a n c e & q u o t ; < b r / > x s i : s c h e m a L o c a t i o n = & q u o t ; h t t p : / / m a v e n . a p a c h e . o r g / P O M / 4 . 0 . 0 h t t p : / / m a v e n . a p a c h e . o r g / x s d / m a v e n - 4 . 0 . 0 . x s d & q u o t ; & g t ; < b r / > & l t ; m o d e l V e r s i o n & g t ; 4 . 0 . 0 & l t ; / m o d e l V e r s i o n & g t ; < b r / > < b r / > & l t ; p a r e n t & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - p a r e n t & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 3 . 1 . 0 & l t ; / v e r s i o n & g t ; < b r / > & l t ; / p a r e n t & g t ; < b r / > < b r / > & l t ; p r o p e r t i e s & g t ; < b r / > & l t ; m a v e n . c o m p i l e r . s o u r c e & g t ; 1 7 & l t ; / m a v e n . c o m p i l e r . s o u r c e & g t ; < b r / > & l t ; m a v e n . c o m p i l e r . t a r g e t & g t ; 1 7 & l t ; / m a v e n . c o m p i l e r . t a r g e t & g t ; < b r / > & l t ; p r o j e c t . b u i l d . s o u r c e E n c o d i n g & g t ; U T F - 8 & l t ; / p r o j e c t . b u i l d . s o u r c e E n c o d i n g & g t ; < b r / > & l t ; l o g 4 . v e r s i o n & g t ; 2 . 2 0 . 0 & l t ; / l o g 4 . v e r s i o n & g t ; < b r / > & l t ; a s p e c t j . v e r s i o n & g t ; 1 . 9 . 1 9 & l t ; / a s p e c t j . v e r s i o n & g t ; < b r / > & l t ; m a v e n - s u r e f i r e - p l u g i n . v e r s i o n & g t ; 3 . 0 . 0 - M 5 & l t ; / m a v e n - s u r e f i r e - p l u g i n . v e r s i o n & g t ; < b r / > & l t ; / p r o p e r t i e s & g t ; < b r / > < b r / > & l t ; d e p e n d e n c i e s & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; c o m . g o o g l e . c o d e . g s o n & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; g s o n & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 2 . 1 0 . 1 & l t ; / v e r s i o n & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; e x c l u s i o n s & g t ; < b r / > & l t ; e x c l u s i o n & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - l o g g i n g & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; / e x c l u s i o n & g t ; < b r / > & l t ; / e x c l u s i o n s & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . k a f k a & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - k a f k a & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; e x c l u s i o n s & g t ; < b r / > & l t ; e x c l u s i o n & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - l o g g i n g & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; / e x c l u s i o n & g t ; < b r / > & l t ; / e x c l u s i o n s & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; i o . g i t h u b . l o g n e t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; g r p c - s p r i n g - b o o t - s t a r t e r & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 5 . 1 . 5 & l t ; / v e r s i o n & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . a p a c h e . t o m c a t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; a n n o t a t i o n s - a p i & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 6 . 0 . 5 3 & l t ; / v e r s i o n & g t ; < b r / > & l t ; s c o p e & g t ; p r o v i d e d & l t ; / s c o p e & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > < b r / > < b r / > < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . a p a c h e . l o g g i n g . l o g 4 j & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; l o g 4 j - s l f 4 j 2 - i m p l & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 2 . 2 1 . 1 & l t ; / v e r s i o n & g t ; < b r / > & l t ; s c o p e & g t ; t e s t & l t ; / s c o p e & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . p o s t g r e s q l & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; p o s t g r e s q l & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 4 2 . 6 . 0 & l t ; / v e r s i o n & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - t e s t & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; e x c l u s i o n s & g t ; < b r / > & l t ; e x c l u s i o n & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - l o g g i n g & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; / e x c l u s i o n & g t ; < b r / > & l t ; / e x c l u s i o n s & g t ; < b r / > & l t ; s c o p e & g t ; t e s t & l t ; / s c o p e & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; i o . f a b r i c 8 & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; o p e n s h i f t - c l i e n t & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 6 . 5 . 1 & l t ; / v e r s i o n & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; i o . q a m e t a . a l l u r e & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; a l l u r e - j u n i t 5 & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; v e r s i o n & g t ; 2 . 2 0 . 1 & l t ; / v e r s i o n & g t ; < b r / > & l t ; s c o p e & g t ; t e s t & l t ; / s c o p e & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . p r o j e c t l o m b o k & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; l o m b o k & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . j a c o c o & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; o r g . j a c o c o . a g e n t & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; c l a s s i f i e r & g t ; r u n t i m e & l t ; / c l a s s i f i e r & g t ; < b r / > & l t ; v e r s i o n & g t ; 0 . 8 . 1 2 & l t ; / v e r s i o n & g t ; < b r / > & l t ; / d e p e n d e n c y & g t ; < b r / > & l t ; d e p e n d e n c y & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - w e b & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; e x c l u s i o n s & g t ; < b r / > & l t ; e x c l u s i o n & g t ; < b r / > & l t ; g r o u p I d & g t ; o r g . s p r i n g f r a m e w o r k . b o o t & l t ; / g r o u p I d & g t ; < b r / > & l t ; a r t i f a c t I d & g t ; s p r i n g - b o o t - s t a r t e r - l o g g i n g & l t ; / a r t i f a c t I d & g t ; < b r / > & l t ; / e x c l u s i o n & g t ; < b r / > & l t ; / e x c l u s i o n s & g t ; < b r / > & l t ; / dependency>
org.springframework.boot
spring-boot-starter-data-jpa
org.springframework.boot
spring-boot-starter-logging
org.xolstice.maven.plugins
protobuf-maven-plugin
0.5.1
com.google.protobuf:protoc:3.5.1-1:exe:${os.detected.classifier}
grpc-java
io.grpc:protoc-gen-grpc-java:1.17.1:exe:${os.detected.classifier}
compile
compile-custom
org.apache.maven.plugins
maven-surefire-plugin
${maven-surefire-plugin.version}
false
-Dfile.encoding=${project.build.sourceEncoding}
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
junit.jupiter.extensions.autodetection.enabled
true
allure.results.directory
${project.build.directory}/allure-results
org.aspectj
aspectjweaver
${aspectj.version}
org.junit.jupiter
junit-jupiter-engine
5.8.1
io.qameta.allure
allure-maven
2.12.0
target/allure-report
target/site
kr.motd.maven
os-maven-plugin
1.6.2
Подробнее здесь: [url]https://stackoverflow.com/questions/79089762/error-creating-bean-with-name-catalogdaoservice-unsatisfied-dependency-expres[/url]
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Ошибка создания bean-компонента с именем «catalogDaoService». Неудовлетворенная зависимость, выраженная через параметр к
Anonymous » » в форуме JAVAСообщение об ошибке:
java.lang.IllegalStateException: Failed to load ApplicationContext for [WebMergedContextConfiguration@6da648c5 testClass = ru.sbrf.llt.autotests.testing.service.T5196Test, locations = [], classes = , contextInitializerClasses =... - 0 Ответы
- 24 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Ошибка создания bean-компонента с именем «catalogDaoService». Неудовлетворенная зависимость, выраженная через параметр к
Anonymous » » в форуме JAVAСообщение об ошибке:
java.lang.IllegalStateException: Failed to load ApplicationContext for [WebMergedContextConfiguration@6da648c5 testClass = ru.sbrf.llt.autotests.testing.service.T5196Test, locations = [], classes = , contextInitializerClasses =... - 0 Ответы
- 22 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Ошибка создания bean-компонента с именем jdbcConverter в Springframework. Неудовлетворенная зависимость, выраженная чере
Anonymous » » в форуме JAVAJAVA-файл
package com.josueborges.recupera_precos_passagem;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class... - 0 Ответы
- 27 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Ошибка при создании bean-компонента с именем userService: неудовлетворенная зависимость, выраженная через поле userJpaRe
Anonymous » » в форуме JAVAПри попытке доступа на главную страницу возникает следующая ошибка
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userService': Unsatisfied dependency expressed through field 'userJpaRepository';... - 0 Ответы
- 17 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Как исправить: Ошибка создания компонента с именем: Неудовлетворенная зависимость, выраженная через поле: Ошибка создани
Anonymous » » в форуме JAVAЯ пытаюсь настроить API Spring Rest, используя спящий режим, Oracle SQL. При попытке использовать настроенный мной собственный репозиторий я получаю следующую ошибку:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating... - 0 Ответы
- 18 Просмотры
-
Последнее сообщение Anonymous
-
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...