在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:tipsy/j2html开源软件地址:https://github.com/tipsy/j2html开源编程语言:Java 96.7%开源软件介绍:j2htmlJava to HTML generator. Enjoy typesafe HTML generation. The project webpage is j2html.com. Getting startedAdd the maven dependency<dependency>
<groupId>com.j2html</groupId>
<artifactId>j2html</artifactId>
<version>1.5.0</version>
</dependency> Or the gradle dependency
Import TagCreator and start building HTMLimport static j2html.TagCreator.*;
public class Main {
public static void main(String[] args) {
body(
h1("Hello, World!"),
img().withSrc("/img/hello.png")
).render();
}
} The above Java will result in the following HTML: <body>
<h1>Hello, World!</h1>
<img src="/img/hello.png">
</body> Find more examples at http://j2html.com/examples.html |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论