Open casid opened 1 year ago
Why not. It seems there is some kind of proposal process, so maybe we should start with creating such a proposal. But I could imagine it is easier as jte is "just" a template engine and not backed by a company like this proposal https://github.com/spring-io/start.spring.io/issues/1114
Oh yes, the proposal you linked looks frightening. I'm unsure if we are ready to commit to this.
Should we try to create a proposal here together? At jcon a lot of people knew and asked Thomas and me about jte vs thymeleaf for example. So I would say there is some interest
That would be awesome! What would be the best way to collaborate on a document like this? Best thing I could think of would be a branch with a markdown file in it?
Also, really cool to hear that people where asking about jte 😊
@casid Yea I currently support 2 template engines in my library, and JTE is definitely the better option, for using with Spring ViewComponent. Thymeleaf has a lot of Spring Magic, that you don't really need with server-side components.
I just need to get going on my compile time checker because then JTE would be completely type safe and null safe, cause currently JTE throws an error at runtime if a property that is declared as an parameter is not available in the model.
btw did you see my Spring I/O Talk? I also talked a bit about JTE there: https://youtu.be/DPAtQU-erM4?t=749
@tschuehly great talk, thanks for sharing the video!
As for type-safety of params, maybe the new jte-models extension could be helpful?
@casid, if it’s okay with you, I would like to add support for JTE templates in Generator Genie. I’ve already started the process but ran into this issue, which I posted on StackOverflow. Once this issue is resolved, I plan to add support for JTE templates.
Welcome @nicholasnet
Sure thing, go for it, that's very much appreciated!
Can you post a stacktrace of the error you run into in production?
Sure here is the repo link I think that will be easier. As you see this is plain vanilla Spring Boot MVC app. https://github.com/nicholasnet/jte-spring-gradle
Here if you do just ./gradlew bootRun
Then go to http://localhost:8080 it works.
However, if you do
./gradlew bootBuildImage
Then run the image docker run -it --rm -p '8080:8080' -e 'SPRING_PROFILES_ACTIVE=prod' jte:0.0.1-SNAPSHOT
Then go to http://localhost:8080 it does not work.
I've just submitted an issue for integrating it into start.spring.io: https://github.com/spring-io/start.spring.io/issues/1560
Hey @casid, Moritz waits for feedback from you. Would be awesome if you could approve the integration!
Quoting metalhead-001 from reddit, who asked about this in the jte 3 comments.
https://docs.spring.io/spring-boot/docs/3.1.0/reference/htmlsingle/
@atomfrede do you think we should give this a try?