Hello!
I would be very grateful for your help.
Faced the same problem on CAS 5.2.3.
I am using spring data jpa.
In the application.properties file, I described the connection to the database through the standard:
spring.datasource.url =
spring.datasource.username =
spring.datasource.password =
spring.jpa.show-sql =
spring.jpa.hibernate.ddl-auto =
spring.jpa.properties.hibernate.dialect =
Next, I created entities and repository extends CrudRepository.
When trying to @Autowired my repos in services, I get a NoSuchBeanDefinition error.
The configuration goes through the spring.factories file:
org.springframework.boot.autoconfigure.EnableAutoConfiguration = ru.test.security.core.cas.config.CasMainPropertiesConfig
CasMainPropertiesConfig, which contains:
@Configuration ("ConfigurationName")
@EnableConfigurationProperties (CasConfigurationProperties.class)
@ComponentScan ("ru.test.security.core")
@PropertySource ("file: C /.../ cas.standalone.properties")
public class CasMainPropertiesConfig {
}
When trying to insert @EnableJpaRepository or @EntityScan here, the application simply does not start with an error:
[org.apereo.cas.web.CasWebApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [org.apereo.cas.web. CasWebApplication]; nested exception is java.lang.NoClassDefFoundError: org / springframework / data / repository / config / BootstrapMode>
What's going wrong? Tried adding -Dspring.index.ignore = true to run and nothing changes.
I hope very much for your help.
суббота, 15 мая 2021 г. в 00:10:12 UTC+3, Yan Zhou: