Skip to content

Commit ab84131

Browse files
committed
RD-530: can't use '.' in environment variable names
1 parent 50efb9c commit ab84131

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mac_dev_env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
db.url=jdbc:postgresql://host.docker.internal:5432/struts
1+
db_url=jdbc:postgresql://host.docker.internal:5432/struts

src/main/java/org/apache/struts2/showcase/utils/HibernateUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ public class HibernateUtils {
88

99
public static Session getSession() {
1010
final Configuration configuration = new Configuration().configure();
11-
setPropIfEnv(configuration, "hibernate.connection.username", "db.username");
12-
setPropIfEnv(configuration, "hibernate.connection.password", "db.password");
13-
setPropIfEnv(configuration, "hibernate.connection.url", "db.url");
11+
setPropIfEnv(configuration, "hibernate.connection.username", "db_username");
12+
setPropIfEnv(configuration, "hibernate.connection.password", "db_password");
13+
setPropIfEnv(configuration, "hibernate.connection.url", "db_url");
1414

1515
SessionFactory sessionFactory = configuration.buildSessionFactory();
1616
return sessionFactory.openSession();

0 commit comments

Comments
 (0)