<https://start.grails.org/> has been updated with ...
# general
j
https://start.grails.org/ has been updated with Grails 7.0.0-M1. It has also been released to sdkman. grailsVersion is M1 and grailsGradlePluginVersion is M3. Feel free to start opening issues & PRs on the projects and also discussing it on https://github.com/orgs/grails/discussions/13941. If you maintain a plugin you can now update and publish a milestone against 7.0.0-M1. https://docs.grails.org/7.0.0-M1/guide/single.html has had a lot of updates, but still needs contributions via issues and PRs on https://github.com/grails/grails-doc
🚀 6
partygrails 1
❤️ 7
👍 1
j
Huge!
j
g
“The removal of Micronaut enabled simplification of the Grails codebase and the return of Live Reload via https://github.com/HotswapProjects/HotswapAgent🙌 🙌 🙌 🙌
💯 2
🙌 2
partygrails 2
👏 1
u
we're back Mortimer
g
@gsandrew I havent tried it yet, is it really working?! This would be huge 🙂
g
Not yet.. have my engineers doing a poc asap. I may do it myself if they don’t have it by mid Jan latest. I’ve been following the work of the new community and seen the PR’s and it seems legit. New community that’s taken over grails is solid!
👍 2
j
g
Thanks @James Fredley ^^ @Brandon Ray
🚀 1
^^ @Richard Rice
f
I see in the starter you can pick java 21/23 — so it will be offically supported?
When you install 7.0.0-M1 via sdk man, how do you make it use jvm 21 vs 17?
Screenshot 2024-12-30 at 1.25.05 PM.png
j
Put 21 on your PATH. The version you were seeing there is the version that the native image was built with, which is not necessarily the version of Java that you were using in your project.
At least I believe that is the case.
f
ah ok thanks @jeffscottbrown
yah i have 21 in path already was just confused by the jvm version there
j
Yes, Java 17, 21 and if you want bleeding edge 23. grails-core is tested against 17, 21 and 23 on ubuntu, macos and windows: https://github.com/grails/grails-core/actions/runs/12531515387 functional-tests are run against 17, 21 and 23: https://github.com/grails/grails-functional-tests/actions/runs/12531603081 To generate an app with a different version of Java:
grails> create-app --java-version 23 TestJava23
| Application created at TestJava23
which will put the following in
build.gradle
. Then it is up to you via sdkman, IntelliJ, default on path to use your desired version of the JDK.
compileJava.options.release = 23
f
ahh ok that was going to be my next question .. hah yah i just saw compileJava.options.release = 17 — from using create-app
im pretty happy with 21 support was worried it would only be 17 ~~ .
j
Grails 7 will match https://docs.spring.io/spring-boot/system-requirements.html Spring Framework 6.2.x will support Java 24 and 25 (LTS) when they are released and Grail 8, which will be on Spring Framework 7.0.x, will support Java 26 and 27, so Grails 7 and 8 will ultimately support 3 Java LTS versions: 17, 21 and 25 (~2025-09-16) • Spring Framework 7.0.x: JDK 17-27 (expected) • Spring Framework 6.2.x: JDK 17-25 (expected) https://www.java.com/releases/
🔥 2
f
I’m in thanks !
In Grails 7 can the contents of src/main/webapp be accessed directly?
for example i drop in 1.png into this folder, but when i go to

http://localhost:8080/1.png

i get a 404.
tried this but still get a 404.
Copy code
grails:
  resources:
    path: /**
    locations: [file:src/main/webapp/]
tried this also,
Copy code
bootRun {

    doFirst {
        classpath = sourceSets.main.runtimeClasspath + files('src/main/webapp/1.png')
        System.out.print(classpath.files)
    }
}
before i directly added 1,png tried the directory
but 404s on everything
j
images, css and js usually go in assets.
f
@James Fredley what if i wan to host some dynamic gsp pages as content outside of the grails Convention over Configuration flow?
or .html (thymleaf)
would you consider those assets?
i do not see a folder in there called like ‘content’ — will review docs perhaps there is a way to do that
assets to me are limited to like .css/.js etc like you said
j
You can put static .html files in assets, but for thymeleaf you would have to go with the support from spring boot, which is likely to work, but I have not used it. Grails is ultimately a Spring Boot app with lots nice to have (IMO missing) features. https://www.thymeleaf.org/doc/tutorials/3.1/thymeleafspring.html
f
thanks @James Fredley will take a look, its just odd because in old versions of grails the src/main/webapp trick worked, guessing it was changed ~~ will read over the article you linked
@James Fredley have not made it to thymeleaf yet , but here is the simple fix to add back webapp folder, but of course it would prob be best to only include certain file types. — was on the right track before, just syntax appears to be differnt.
Copy code
sourceSets {
    main {
        resources {
            srcDir 'src/main/webapp'
        }
    }
}
🚀 2
— just in case you were curious.