I need to update the config spring.jpa.hibernate.ddl-auto
for one of my test classes. It should remain as update
for all classes except one.
How do I achieve this at run time when session is being managed by Springboot? Or is there some other way out? I had the option to create a session afresh and use it as here but session is not managed manually.
Well, simply adding @TestPropertySource(properties = "spring.jpa.hibernate.ddl-auto = none")
on a test class should work. That's all:)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With