문제

I want to use linux at work but everytime a class gets added to persistence.xml I have to change it's javax.persistence.jdbc.url.

Is there a way to make hibernate use one property for windows and another one for linux without creating two files?

windows is like C:/blah/db.gdb and linux is /home/blah/db.gdb
how can we use one for all?

도움이 되었습니까?

해결책

You can define an alias on the server in aliases.conf (databases.conf in Firebird 3 and higher), and then specify that alias in the connection url instead.

Say that the alias is myApplicationDb, then you can use the URL:

jdbc:firebirdsql://myserver/myApplicationDb

However this is less flexible because it requires you to maintain the aliases.conf file.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top