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

营口pc网站开发郑州百度seo网站优化

营口pc网站开发,郑州百度seo网站优化,新闻聚合网站开发 技术,婚纱摄影网站管理系统创建一个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.mmbaike.com/news/62819.html

相关文章:

  • 做网站学哪方面知识电商最好卖的十大产品
  • 创建平台网站下载软件seo和点击付费的区别
  • 建设报名系统官网是真的吗上海优质网站seo有哪些
  • 商业网站建设实训指导书seo运营经理
  • 哪些网站权重高什么软件可以找客户资源
  • 网站开发搭建网络营销主要内容
  • wordpress本地调试seo排名优化培训网站
  • 优质企业网站建设新网站百度seo如何做
  • 建网站做商城个体户资质可以青岛官网seo
  • 武汉做网站费用网站备案
  • 凡科做网站是否安全杭州seo顾问
  • 义乌网站建设yw126优化网站服务
  • 政府网站 建设依据杭州网站设计制作
  • 室内效果图网站企业网站的在线推广方法有
  • 免费ppt下载网站有哪些google网站
  • 个人做免费的网站百度有免费推广广告
  • 响应式网站建设精英如何推销产品给客户
  • 什么网站可以做卡首屏淘口令天津网站seo设计
  • app开发公司哪里做宁波网站制作优化服务
  • 哪个网站做视频收益高重庆网站排名优化教程
  • 网络公司注册流程及费用seo网站推广技术
  • 做宣传网站需要多少钱衡阳seo优化推荐
  • 如何的找网站建设公司seo人人网
  • 做网站参考文献百度图片识别搜索引擎
  • 百度收录什么网站吗seo关键词排名优化怎样收费
  • 广东东莞天气seo企业站收录
  • 福州网站建设H5福建搜索引擎优化
  • 东莞做网站网络公司谷歌浏览器搜索入口
  • 安阳网站制作哪家好河北seo推广方案
  • 深圳潮流网络公司靠谱吗嘉兴seo外包服务商