GithubHelp home page GithubHelp logo

Comments (3)

damir78 avatar damir78 commented on August 24, 2024

image

from demo-rocker-spring-boot-starter.

damir78 avatar damir78 commented on August 24, 2024

I've noticed if starting frrom IDE- your rocker-s-b-starter creates @runtime in target/classes the related class like target/security/login.class. But if strarts using java -jar blah.jar you can't create class inside jar file (classpath, etc). I think you should use the default maven plugin from rocker templates to create jar- artifacts

image

from demo-rocker-spring-boot-starter.

iceant avatar iceant commented on August 24, 2024

Hi, @damir78
thanks for feedback.
Rocker had 2 seperated package, compiler and runtime package. compiler will generate source code from template, and runtime only use compiled class from classpath.
I don't like to do configuration in different place, so I moved the configuration from maven pom to application.properties for rocker-compiler.
I need to render .js, .css and other files with difference extension name, only support .rocker.html is not engough for me.
So far, the rocker-spring-boot-starter will check the compiled class first, if it can not find the compiled template class, it will try to compile the template to class. The default implementation in rocker is based on file system. We can not use classpath resource to load as string and compile it to class. It's not easy to do that at runtime. Maybe that's possilbe to modify rocker's compiler to make that happen. But, it will take too much time for me.
What make Rocker so fast? It's compiled template engine. So, at development phase, we can use file system based compiler. After the test, we can package to a jar file, and run it. At runtime, everything is just class.
I don't like the default maven based plugin, it's too complex for me. You need to do configuraiton in pom.xml, and run maven generate-sources everytime the template changed. I would like to change the temlate, then refresh the page, everything is reloaded. It works fine for me. Saved lots of time for me. This feature could have memory issue by using classloader to reload classes. But it's just happend at development phase, I can accept that.

from demo-rocker-spring-boot-starter.

Related Issues (1)

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.