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

In the application.yml file without environments settings #13103

Open
fernando88to opened this issue Aug 9, 2023 · 2 comments · May be fixed by grails/grails-forge#293
Open

In the application.yml file without environments settings #13103

fernando88to opened this issue Aug 9, 2023 · 2 comments · May be fixed by grails/grails-forge#293
Assignees

Comments

@fernando88to
Copy link

fernando88to commented Aug 9, 2023

Expected Behavior

That the application.yml file came with the settings below

environments:
    development:
        dataSource:
            dbCreate: create-drop
            url: jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
    test:
        dataSource:
            dbCreate: update
            url: jdbc:h2:mem:testDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
    production:
        dataSource:
            dbCreate: none
            url: jdbc:h2:./prodDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
            properties:
                jmxEnabled: true
                initialSize: 5
                maxActive: 50
                minIdle: 5
                maxIdle: 25
                maxWait: 10000
                maxAge: 600000
                timeBetweenEvictionRunsMillis: 5000
                minEvictableIdleTimeMillis: 60000
                validationQuery: SELECT 1
                validationQueryTimeout: 3
                validationInterval: 15000
                testOnBorrow: true
                testWhileIdle: true
                testOnReturn: false
                jdbcInterceptors: ConnectionState
                defaultTransactionIsolation: 2 # TRANSACTION_READ_COMMITTED

Actual Behaviour

When creating a project with grails 6.0.0 the application.yml file does not have the environments settings at the end as shown below

Steps To Reproduce

curl --location --request GET 'https://grailsforge-latest-cjmq3uyfcq-uc.a.run.app/create/web/com.example.demo?gorm=HIBERNATE&servlet=TOMCAT&test=SPOCK&javaVersion=JDK_11' --output demo.zip
unzip demo.zip

Environment Information

Grails Version: 6.0.0

Example Application

No response

Version

6.0.0

@xpusostomos
Copy link

Is there anything stopping you from adding them, if your personal requirements benefit?

@fernando88to
Copy link
Author

One of the most striking features of Grails is that the application is already configured, I think that new programmers will have to research how to add configurations by environment, since it could already come by default, so it makes it easier.

puneetbehl pushed a commit to grails/grails-forge that referenced this issue Mar 7, 2024
This will add datasource config for each environments (development, test, and production).

Fixes grails/grails-core#13103
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

Successfully merging a pull request may close this issue.

3 participants