Open rokon12 opened 1 year ago
Hello Bazlur,
Thanks for starting this thread! I think your content on Java is amazing!
I have been trying to find a way in Java/JPA/Spring based applications to handle DB migrations. I know Flyway or Liquibase are the most used options, and I have used Flyway many times; adding migration SQL scripts with required versioning and ensuring the entities align with them using:
spring.jpa.hibernate.ddl-auto=validate
While Java/Spring is awesome, but when I look at .NET/EFCore, I don't quite see the flexibility particularly in this area, that DDL scripts can be generated from entities into versioned migration scripts, then again, all updates can be added to new migration scripts with subsequent versioning, etc.
I generated a schema the other day, using:
spring.jpa.properties.javax.persistence.schema-generation.scripts.action=create
spring.jpa.properties.javax.persistence.schema-generation.scripts.create-target=schema.sql
spring.jpa.properties.hibernate.format_sql=true
However, I fail to understand, how these can be automatically versioned and applied.
I admit, maybe I am looking at wrong places. While I like both Java/Spring and .NET, I am just trying to understand the options, not drawing comparison.
My question is, in your opinion, what the best way would be to:
PS: I know plugins like JPABuddy helps, but other alternatives?
Best, Saurav
Is there any way to host directly Java Application in Windows IIS?
Unfortunately, Windows Internet Information Services (IIS) is not natively designed to host Java applications. There might be some third-party solution to connect IIS to Tomcat, e.g. I found this repository: https://github.com/Bilal-S/iis2tomcat. This is pretty old, so I don't know if this will work now. I am just curious about what you are trying to accomplish. There might be other solutions, so tell me, why do you need that?
I agree with you & familiar with AWS Elastic Beanstalk, Tomcat. But the company I worked for right now they hold their all-other web projects on IIS. They asked me to host the Spring Boot Application in IIS, one kind of requirements from them & I find there was no direct way to deploy java application in IIS then I asked you for the confirmation.
I have a multi tenant project using spring boot, jpa/hibernate. Using schema based multi tenancy in same postgres db. Some common tables for all company in Public schema and each company having separate schema. In some cases I have to do work on public schema as well as on specific tenant schema. I want to use same transaction in these cases. I have 2 TX manager: publicTxManager for public schema, tenantTxManager for tenants. I have found spring ChainedTransactionManager but it is deprecated. How can I achieve this?
Exciting News for My Network 🚀
I've been fortunate to receive many questions and engage in valuable discussions across different channels. Your curiosity and eagerness to learn have inspired me to create something special.
I'm pleased to announce the launch of a new GitHub repository dedicated to your questions related to software engineering, Java, architecture, and industry trends. This repository will be a one-stop solution for all your queries, ensuring that no question goes unanswered.
Here's how it works: 1️⃣ Post your questions in the comments section bellow. 2️⃣ I'll do my best to respond, either directly in the repo or through an in-depth article on my blog.
By centralizing these interactions, I hope to create a valuable resource that's not only beneficial to you but also accessible to anyone interested in our shared passions.
Your questions don't have to be confined to a narrow field. Whether it's something specific about Java or a more general inquiry about software development, architecture, or industry trends, I'm here to engage with you.
Your thoughts, questions, and feedback are the driving force behind this initiative, and I can't wait to see where this collaborative effort takes us.
Happy coding, and let's keep the conversation going! 🎉
softwareengineering #java #knowledgeSharing #communityBuilding