当前位置: 首页 > news >正文

中国外贸出口网站项目外包公司到底值不值得去

中国外贸出口网站,项目外包公司到底值不值得去,云建网站网址,昆明建设网站制作创建一个Spring Boot和EasyUI相结合的项目。 一、构建一个Spring Boot项目 Spring Boot之创建一个Spring Boot项目(一)-CSDN博客 二、配置Thymeleaf Spring Boot Thymeleaf(十一)_thymeleaf 设置字体_人……杰的博客-CSDN博客…

        创建一个Spring Boot和EasyUI相结合的项目。

一、构建一个Spring Boot项目

Spring Boot之创建一个Spring Boot项目(一)-CSDN博客

二、配置Thymeleaf

Spring Boot Thymeleaf(十一)_thymeleaf 设置字体_人……杰的博客-CSDN博客

三、配置EasyUI

1 下载EasyUI的对应jar包并配置使用EasyUI

下载地址:EasyUI框架下载 - EasyUI中文站

 

 

        新建一个index.html文件,注意这个文件需要放在static目录下,也就是跟easyui在同一个目录,否则放在templates下由于springboot的内部机制,调用接口访问不到会报404,结构如上图所示,浏览器访问这个页面的路径是localhost:8080/index.html


引入EasyUI:

    <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css"><link rel="stylesheet" type="text/css" href="../../themes/icon.css"><link rel="stylesheet" type="text/css" href="../demo.css"><script type="text/javascript" src="../../jquery.min.js"></script><script type="text/javascript" src="../../jquery.easyui.min.js"></script>

四、项目举例

1 项目框架

2 代码实现

SpringBootMainApplication.java:

package com.xj.main;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;/*** @Author: xjfu* @Create: 2023/10/20 7:33* @Description: SpringBoot启动类*/
@ComponentScan("com.xj")
@SpringBootApplication
public class SpringBootMainApplication {public static void main(String[] args) {try{SpringApplication.run(SpringBootMainApplication.class, args);}catch (Exception e){e.printStackTrace();}}
}

ThymeleafController.java:

package com.xj.controller;import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;/*** @Author: xjfu* @Create: 2023/10/20 7:42* @Description:*/
@RequestMapping("/easyui")
@Controller
public class ThymeleafController {@RequestMapping("/hello")public String sayHello(){//启动hello.html页面return "hello";}@RequestMapping("/helloPage")public String helloPage(){//启动helloPage.html页面return "helloPage";}
}

index.html:

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head><meta charset="UTF-8"><title>Custom Window Tools - jQuery EasyUI Demo</title><link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css"><link rel="stylesheet" type="text/css" href="../../themes/icon.css"><link rel="stylesheet" type="text/css" href="../demo.css"><script type="text/javascript" src="../../jquery.min.js"></script><script type="text/javascript" src="../../jquery.easyui.min.js"></script>
</head>
<body>
<div id="win" class="easyui-window" title="My Window" style="width:300px;height:100px;padding:5px;">Hello! Sprring Boot + easyUI success!
</div>
</body>
</html>

hello.html:

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head><meta charset="UTF-8"><title>Title</title>
</head>
<body>
<!--th:text 为 Thymeleaf 属性,用于在展示文本-->
<h1 th:text="迎您来到Thymeleaf">欢迎您访问静态页面 HTML</h1>
</body>
</html>

helloPage.html:

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head><meta charset="UTF-8"><title>Custom Window Tools - jQuery EasyUI Demo</title><link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css"><link rel="stylesheet" type="text/css" href="../../themes/icon.css"><link rel="stylesheet" type="text/css" href="../demo.css"><script type="text/javascript" src="../../jquery.min.js"></script><script type="text/javascript" src="../../jquery.easyui.min.js"></script>
</head>
<body>
<div id="win" class="easyui-window" title="My Window" style="width:300px;height:100px;padding:5px;">Hello! Sprring Boot + easyUI success!
</div>
</body>
</html>

3 运行结果

3.1 测试thymeleaf正常

3.2 EasyUI访问方式

3.3 使用thymeleaf访问方式

五、参考

1.SpringBoot集成EasyUI_springboot整合easyui-CSDN博客

2.https://www.cnblogs.com/jingmoxukong/p/10239821.html

3.Easyui 创建简单窗口_EasyUI 教程

http://www.yayakq.cn/news/654033/

相关文章:

  • 无经验可以做网站编辑吗公司网站变更域名
  • 平台网站模板交互网站是什么
  • 试玩网站开发php招投标网站源码
  • 百度网盟有哪些网站手机制作app需要什么软件
  • 站群管理系统外贸做那种网站
  • ps设计师网站有哪些云主机可以做几个网站
  • 荆门网站制作公司深圳松岗 网站建设
  • 公司网站后台管理教程做衣服外贸用什么网站好
  • 福州网站seo凡科建站如何制作论坛
  • 消防器材网站建设背景企业网站开发 文献综述
  • 站外推广网站大连网站设计公司排名
  • 网络营销营销型网站成都官网建设公司
  • 网站建设需要备案企业建立自己的网站
  • ICO网站模板苏州自助建站模板
  • 网站次页网站运营意义
  • 前端直播网站怎么做做一个网站的步骤
  • 电商网站主题自考网站建设与管理资料
  • 网站增加聊天网站建设项目需求概要说明书
  • 大学网站栏目建设东莞市房管局官方网站
  • 高中信息技术课程做网站线上平台建设怎么做
  • ps 矢量素材网站公司做网页去哪找
  • 服装网站建设费用app在线开发制作平台
  • 荆门网站建设服务青岛网站建设有限公司
  • 24手表网站wordpress主页添加meta
  • 怎么做浏览器网站大良网站制作公司
  • 深圳网址网站建设公司福建省建设行业企业资质查询网站
  • 网站到期了怎么办网盘 wordpress模板
  • 附近的网站设计开发合肥网络推广优化公司
  • 网站开发工程师的职责网站报名系统怎么做
  • 公司网站模板 html自己做菠菜网站