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

Support groovy template engine in webflux [SPR-15850] #20405

Closed
spring-projects-issues opened this issue Aug 7, 2017 · 9 comments
Closed

Support groovy template engine in webflux [SPR-15850] #20405

spring-projects-issues opened this issue Aug 7, 2017 · 9 comments
Assignees
Labels
in: web status: declined type: enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Aug 7, 2017

Jason Yu opened SPR-15850 and commented

Support groovy template engine just like spring web mvc. It would be nice to write domain-specific code via groovy markup builder.


No further details from SPR-15850

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Aug 9, 2017

Jason Yu commented

I plan to develop this feature. Before I open pull request, What things should I pay attention to?

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Aug 17, 2017

Jason Yu commented

I have migrated implementation from WebMVC to WebFlux and pull request opened. Could this issue be solved in RC4? If I want to use groovy template via spring boot, I need to open a relative issue on GitHub’s integrated issue tracking system of spring boot?

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 13, 2017

Brian Clozel commented

Could this be contributed as a third party project?

With Spring 5, we've chosen to keep the Freemarker support as a reference implementation - but let templating engines support their own infrastructure (see this comment). Many projects like Thymeleaf thrive without an "official" support provided by the Framework itself.

I'd be happy to provide feedback on the PR if you're considering moving it to its own project.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 13, 2017

Jason Yu commented

I see your point, I will try to open relative issue on Groovy's Jira. But I not sure Groovy's contributor willing to implement groovy template for Spring 5 just like thymeleaf-spring5 package or not.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 13, 2017

Brian Clozel commented

Indeed, groovy itself may not be the best place. Maybe a separate project?

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 13, 2017

Jason Yu commented

I have no idea. Please let me know if you have any suggestions.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 15, 2017

Jason Yu commented

As result, If no one want to do that. I may open a own project for it. So you can close this issue, thanks.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 15, 2017

Brian Clozel commented

Alright, thanks for the update.

Just one tip about your current PR. DataBuffer are low level constructs, and can be pooled - this is why we need to allocate/release them.
You can release a DataBuffer instance in two ways:

  1. if everything goes well, by writing it to the exchange response; the releasing will be done for you when the buffer is written on the network
  2. by releasing it manually; this is required if it's not written to the response. In your implementation, if an exception happens while rendering the template, you have to call DataBufferUtils.release(buffer);.

Let me know if/when you create that project. I'll happily review the implementation. Thanks for your contribution!

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 15, 2017

Jason Yu commented

Cool, thanks for your tip. I will survey thymleaf-spring5 and spring-boot 2 first.

@spring-projects-issues spring-projects-issues added status: declined type: enhancement in: web labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web status: declined type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants