Fetch the repository succeeded.
This action will force synchronization from JbootProjects/jboot, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
本文档的目的是让您学习完成之后,能对 Jboot 有一个整体的了解,开始基于 Jboot 开发自己的应用程序。
本文档假设您已经具备了如下基本技能:
pom.xml
上添加 Jboot 依赖略
pom.xml
上添加 Jboot 依赖<dependency>
<groupId>io.jboot</groupId>
<artifactId>jboot</artifactId>
<version>2.1.6</version>
</dependency>
@RequestMapping("/")
public class HelloworldController extends JbootController {
public void index(){
renderText("hello world");
}
public static void main(String[] args){
JbootApplication.run(args);
}
}
备注:真正项目开发中,建议不要把
main
方法写在Controller
里,否则会导致这个 Controller 的热加载出现问题。
main()
方法,并在浏览器查看浏览器输入:http://127.0.0.1:8080
,此时,能看到浏览器显示 hello world
的文字内容。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。