Hello all,
We have some new guides again:
- How to add Flyway to your application: Database migration with Flyway in Vaadin applications
- How to replace H2 with PostgreSQL: How to replace H2 with PostgreSQL | Vaadin
-Petter-
Hello all,
We have some new guides again:
-Petter-
Using DynamicPropertySource is no longer the way to use Testcontainers with Spring Boot since there is ServiceConnection
Please check out the docs: Testcontainers :: Spring Boot
The simplest way to find out how Spring Boot recommends using libraries go to https://start.spring.io and create a new application with Testcontainers and Postgresql.
It’s also important to mention that this will generate a TestApplication in the src/test/java directory that you can use during development that will also Testcontainers.
Thanks for the tip! I only looked at Testcontainers’ own documentation. I’ll check out the proper Spring Boot way and update the guide.
-Petter-
Great guides, thank you Petter.
For the section “Start a Development Database” you could also consider the usage of Spring Boot Docker Compose, as described here: Development-time Services :: Spring Boot. Although this approach works well when developers have to deal with multiple projects and different environments, it may be a bit more complicated to explain in the guide, compared to the current approach using just docker run
.
Thanks for the tip! It sounds like that is the subject for a deep-dive. I’ll put it on my list.
-Petter-
If you add the dependencies on start.spring.io everything will be generated for you.
I no longer use start.vaadin.com because it’s very limited compared to what the Spring initializer is generating.
Not wanting to dismiss any effort on writing quality guides and documentation (these guides are of high quality, just like the rest of the Vaadin doc so a big is in order here), but … I do wonder why such guides are being put in the Vaadin documentation ? Is it for SEO reasons, to attract developers who are looking to get answer to this question ? An H2->Postgres migration guide or a Flyway integration guide seem oddly out of place on the Vaadin website.
This is part of our “Vaadin Way” documentation. We basically want to help new users start building an application in a way that can also cover their future needs. We don’t want to only say “this is how you do the UI, then you figure out everything else on your own”.
Just for context: The Vaadin Way
I’ve now updated the guide and also added support for Testcontainers directly to the walking skeleton.