Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

673
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda