If you restart the app all the thread will be lost and with this also the data the user entered.
If you have a relational database like Oracle, MySQL, PostgreSQL etc. then the connection will be lost and the transaction will rollback. Because of the ACID rule the data will not be in an inconsistent sate.
solved If we restart Spring Boot application, what happened to the running user thread?