What is this spring.jpa.open-in-view=true property in Spring Boot?

I saw spring.jpa.open-in-view=true property in Spring Boot documentation for JPA configuration. Is the true default value for this property if it’s not provided at all?; What does this really do? I did not find any good explaining for it; Does it make you use SessionFactory instead of EntityManagerFactory? If yes, how can I tell it … Read more

Unable to find a @SpringBootConfiguration when doing a JpaTest

I’m new to frameworks (just passed the class) and this is my first time using Spring Boot. I’m trying to run a simple Junit test to see if my CrudRepositories are indeed working. The error I keep getting is: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=…) with your test java.lang.IllegalStateException … Read more

Spring – No EntityManager with actual transaction available for current thread – cannot reliably process ‘persist’ call

I get this error when trying to invoke “persist” method to save entity model to database in my Spring MVC web application. Can’t really find any post or page in internet that can relate to this particular error. It seems like something’s wrong with EntityManagerFactory bean but i’m fairly new to Spring programming so for … Read more

How do I activate a Spring Boot profile when running from IntelliJ?

I have 5 environments: – local (my development machine) – dev – qc – uat – live – staging I want different application properties to be used for each environment, so I have the following properties files each which have a different URL for the datasource: – application.properties (containing common properties) – application-local.properties – application-dev.properties … Read more

How does spring.jpa.hibernate.ddl-auto property exactly work in Spring?

I was working on my Spring boot app project and noticed that, sometimes there is a connection time out error to my Database on another server(SQL Server). This happens specially when I try to do some script migration with FlyWay but it works after several tries. Then I noticed that I didn’t specify spring.jpa.hibernate.ddl-auto in … Read more