[cas-user] Re: Trouble CAS 6.3.x autowire JPA Repository Beans

2022-04-04 Thread Yan
Hi, I remember spending a lot of time on this when we moved from CAS5 to CAS6, to get Spring Data Repository working, the reason was because Spring 5 feature changes. All I had to do is: -Dspring.index.ignore=trueadd this to startup script. Spring 5 has this new feature that CAS builds

[cas-user] Re: Trouble CAS 6.3.x autowire JPA Repository Beans

2022-04-01 Thread Pablo Vidaurri
Thanks for the input Yan. I would hate to do that for every class, but I'll try it for one or two entities/repos to see if it gets past my problem. In my current project that works for 6.3 ... 1) META-INF/spring.factories:

[cas-user] Re: Trouble CAS 6.3.x autowire JPA Repository Beans

2022-03-31 Thread Yan
Hi, If JPA worked for you in 6.3 but not in 6.4, you may have a different problem than I had. JPA Repository does work for me in 6.4.4., this is what I did. under project's resources/META-INF/spring.components, I explicitly spelled out all Repo and Entity classes. == these are my classes

[cas-user] Re: Trouble CAS 6.3.x autowire JPA Repository Beans

2022-03-31 Thread Pablo Vidaurri
I'm still having trouble with this. Has anyone upgraded to 6.4.x or above with jpa repository classes? It's as if @EnableJpaRepositories is being ignored. On Tuesday, March 1, 2022 at 10:05:41 AM UTC-6 Pablo Vidaurri wrote: > Hi Yan, have you tried this with CAS 6.4.5 which uses SpringBoot

[cas-user] Re: Trouble CAS 6.3.x autowire JPA Repository Beans

2022-03-01 Thread Pablo Vidaurri
Hi Yan, have you tried this with CAS 6.4.5 which uses SpringBoot 2.5.4? I am seeing issues finding my repositiory beans, I have not been able to get it working. All continue to works with 6.3.7.4. On Monday, August 30, 2021 at 12:16:38 PM UTC-5 Yan Zhou wrote: > Hello, > > CAS6 and CAS5 are

[cas-user] Re: Trouble CAS 6.3.x autowire JPA Repository Beans

2021-09-08 Thread Pablo Vidaurri
This also worked for me with a few exceptions. In my entity class, I had to use @Table and @Column annotations to provide the name of my table and columns. I was expecting the CamelCase naming convention of the class and properties to translate to snake case (userId -> user_id) but it looked

[cas-user] Re: Trouble CAS 6.3.x autowire JPA Repository Beans

2021-08-31 Thread Ivan Green
*Thanks a lot for the answer! * It helped me! I slightly changed the bean DataSource, namely: @Bean(name = "casDataSource") protected DataSource casDS() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName(driver);

[cas-user] Re: Trouble CAS 6.3.x autowire JPA Repository Beans

2021-08-30 Thread Yan
Hello, CAS6 and CAS5 are different, but they both disable DataSourceAutoConfiguration, so we need to configure database ourselves. this is what I do. under org.apereo.cas.config package. And then, under spring.factories, include it in auto-configuration:

[cas-user] Re: Trouble CAS 6.3.x autowire JPA Repository Beans

2021-08-30 Thread Ivan Green
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

[cas-user] Re: Trouble CAS 6.3.x autowire JPA Repository Beans

2021-05-14 Thread Yan Zhou
I figured out before I was about to give up. All I had to do is: -Dspring.index.ignore=trueadd this to startup script. Spring 5 has this new feature that CAS builds on, it won’t load JPA repository beans unless one of its modules has it included in META-INF/spring.components Once I

[cas-user] Re: Trouble CAS 6.3.x autowire JPA Repository Beans

2021-05-13 Thread Pablo Vidaurri
I assume you are also using org.springframework.boot:spring-boot-starter-data-jpa or is there a special CAS dependency to use instead? On Thursday, May 13, 2021 at 5:42:23 PM UTC-5 Yan Zhou wrote: > Hello, > > I am about to give up, and stay with jdbcTemplate. I am unable to get > Spring JPA

[cas-user] Re: Trouble CAS 6.3.x autowire JPA Repository Beans

2021-05-13 Thread Yan Zhou
Hello, I am about to give up, and stay with jdbcTemplate. I am unable to get Spring JPA Data Repository to work with CAS 6.4 snapshot. This is my CasWebApplication, everything about data repository is enabled. But there is no indication in logs that data-jpa autoConfiguration is taking

[cas-user] Re: Trouble CAS 6.3.x autowire JPA Repository Beans

2021-05-12 Thread Pablo Vidaurri
Having same problem with the autowire of the repository annotated class. Any help would be appreciated. -psv On Tuesday, May 11, 2021 at 8:43:05 AM UTC-5 Yan Zhou wrote: > Hello, > > CAS uses Spring JdbcTemplate, it does not use Spring JPA Data Repository. > I was able to easily add that in