Git Product home page Git Product logo

Comments (6)

linux-china avatar linux-china commented on July 4, 2024 7

I created a Rocker demo with Spring Boot 2 https://github.com/linux-china/rocker-template-demo

from rocker.

jjlauer avatar jjlauer commented on July 4, 2024 5

@ALEXAME - happy to help or take a stab at it when time permits. Just like our ninja framework and jooby integrations, I'm guessing an integration + example is what would be needed.

from rocker.

bendem avatar bendem commented on July 4, 2024 3

I have actually written a basic rocker integration for spring. Here is the relevant part until I opensource the project.

https://gist.github.com/bendem/8675b7ca856cdab6c208ff6528850f7f

added to the existing converters by extending WebMvcConfigurerAdapter and overriding

@Override
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
    converters.add(new RockerMessageConverter());
}

from rocker.

iceant avatar iceant commented on July 4, 2024 2

check this: rocker-spring-boot-starter
https://github.com/iceant/rocker-spring-boot-starter

from rocker.

mwatel42 avatar mwatel42 commented on July 4, 2024

I am definitely interested. I just compared Thymeleaf, JMustache and Freemarker in Spring Boot, and Rocker performances look promising.

from rocker.

agentgt avatar agentgt commented on July 4, 2024

I'm just lurking here but I do like @bendem solution albeit it tightly couples your code with Rocker (via RockerModel). I think a type level Annotation on plain POJO's would be better solution then return RockerModel on every controller method but currently I have no idea if that is possible (I can't come up with a reason why it would not work).

Part of the problem is Spring MVC just assumes the model is a Map<String,?> which isn't ideal for compile time template. FWIW its one of the reasons why we use handlebars.java. That is avoid putting logic in the templates.

from rocker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.