Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

672
Views
Spring Boot: use database config from WildFly's standalone.xml

I'm currently developing an REST app whith Spring boot. For development, I hardcode my database configuration in application.properties. However, this app is going to be deployed on different WildFly servers, each of them defining their DB config (user credentials) in standalone.xml.

As I'm a newbe to Spring/Java, here is my question: How can I use the DB config from standalone for my spring app?

I already did some research. What I got is to define Services with an @PersistenceContext annotated entity manager. But how can I use it without defining new services, just by using plain JpaRepositories?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

In Wildfly you will have a datasource configured with at JNDI name.

Instead of configuring url, username and password you have to configure this JNDI name:

spring.datasource.jndi-name=java:jboss/datasources/myGreatDS

That's all.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!