Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spring boot: how to provide application.properties for payload app #394

Open
simonwibberley opened this issue Mar 17, 2020 · 1 comment
Open

Comments

@simonwibberley
Copy link

simonwibberley commented Mar 17, 2020

Hi - it appears that the datasource for payloads when run with a JQM provided context doesn't reflect the application.properties of the payload spring boot app.

Is there a way to set application.properties for JQM provided context? Possibly adding it to the classpath somehow (I'm terrible with classpath magic...)

The workaround I've found is to provide the datasource on a @configuration class:

    @Bean
    @Primary
    public DataSource dataSource() {
        return DataSourceBuilder
                .create()
                .username("")
                .url("")
                .driverClassName("")
                .build();
    }

Thanks!

@marcanpilami
Copy link
Contributor

Hi. I shall take a look at this but inside JQM, the usual way to define data sources is to use JNDI, which in turn can be injected by Spring without further ado. There is a full section inside the doc on the JNDI directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants