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

网站建设批发seo工作怎么样

网站建设批发,seo工作怎么样,wordpress后台增加管理页,成都疫情最新情况今日新增SpringBoot案例5,案例5.1 创建工程5.2 代码拷贝5.3 配置文件5.4 静态资源目标 基于SpringBoot的完成SSM整合项目开发 5,案例 SpringBoot 到这就已经学习完毕,接下来我们将学习 SSM 时做的三大框架整合的案例用 SpringBoot 来实现一下。我们完…

SpringBoot案例

  • 5,案例
    • 5.1 创建工程
    • 5.2 代码拷贝
    • 5.3 配置文件
    • 5.4 静态资源

目标

  • 基于SpringBoot的完成SSM整合项目开发

5,案例

SpringBoot 到这就已经学习完毕,接下来我们将学习 SSM 时做的三大框架整合的案例用 SpringBoot 来实现一下。我们完成这个案例基本是将之前做的拷贝过来,修改成 SpringBoot 的即可,主要从以下几部分完成

  1. pom.xml

    配置起步依赖,必要的资源坐标(druid)

  2. application.yml

    设置数据源、端口等

  3. 配置类

    全部删除

  4. dao

    设置@Mapper

  5. 测试类

  6. 页面

    放置在resources目录下的static目录中


5.1 创建工程

创建 SpringBoot 工程,在创建工程时需要勾选 webmysqlmybatis,工程目录结构如下

由于我们工程中使用到了 Druid ,所以需要导入 Druid 的坐标

<dependency><groupId>com.alibaba</groupId><artifactId>druid</artifactId><version>1.1.16</version>
</dependency>

5.2 代码拷贝

springmvc_11_page 工程中的 java 代码及测试代码连同包拷贝到 springboot_09_ssm 工程,按照下图进行拷贝

需要修改的内容如下:

  • Springmvc_11_pageconfig 包下的是配置类,而 SpringBoot 工程不需要这些配置类,所以这些可以直接删除

  • dao 包下的接口上在拷贝到 springboot_09-ssm 工程中需要在接口中添加 @Mapper 注解

  • BookServiceTest 测试需要改成 SpringBoot 整合 junit

    @SpringBootTest
    public class BookServiceTest {@Autowiredprivate BookService bookService;@Testpublic void testGetById(){Book book = bookService.getById(2);System.out.println(book);}@Testpublic void testGetAll(){List<Book> all = bookService.getAll();System.out.println(all);}
    }
    

5.3 配置文件

application.yml 配置文件中需要配置如下内容

  • 服务的端口号
  • 连接数据库的信息
  • 数据源
server:port: 80spring:datasource:type: com.alibaba.druid.pool.DruidDataSourcedriver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://localhost:3306/ssm_db #?servierTimezone=UTCusername: rootpassword: root

5.4 静态资源

SpringBoot 程序中是没有 webapp 目录的,那么在 SpringBoot 程序中静态资源需要放在什么位置呢?

静态资源需要放在 resources 下的 static 下,如下图所示


学习笔记 from 黑马程序员

By – Suki 2023/4/6


文章转载自:
http://undertint.Lnnc.cn
http://quantifier.Lnnc.cn
http://larkspur.Lnnc.cn
http://yukata.Lnnc.cn
http://snorter.Lnnc.cn
http://udsl.Lnnc.cn
http://belinda.Lnnc.cn
http://intoxicant.Lnnc.cn
http://mold.Lnnc.cn
http://incompetently.Lnnc.cn
http://roxy.Lnnc.cn
http://antiviral.Lnnc.cn
http://bradawl.Lnnc.cn
http://neolithic.Lnnc.cn
http://spiv.Lnnc.cn
http://sparid.Lnnc.cn
http://straiten.Lnnc.cn
http://breeching.Lnnc.cn
http://plethysmograph.Lnnc.cn
http://selectric.Lnnc.cn
http://consummative.Lnnc.cn
http://misstate.Lnnc.cn
http://uniformity.Lnnc.cn
http://mvo.Lnnc.cn
http://keloid.Lnnc.cn
http://garboard.Lnnc.cn
http://lumen.Lnnc.cn
http://unreversed.Lnnc.cn
http://portugal.Lnnc.cn
http://crudification.Lnnc.cn
http://sidestream.Lnnc.cn
http://gaoshan.Lnnc.cn
http://carpus.Lnnc.cn
http://biotechnology.Lnnc.cn
http://spiciness.Lnnc.cn
http://fontange.Lnnc.cn
http://confrontationist.Lnnc.cn
http://captress.Lnnc.cn
http://raki.Lnnc.cn
http://versicolor.Lnnc.cn
http://calabash.Lnnc.cn
http://ringless.Lnnc.cn
http://avidity.Lnnc.cn
http://ventilate.Lnnc.cn
http://meclozine.Lnnc.cn
http://pndb.Lnnc.cn
http://aphrodisiacal.Lnnc.cn
http://reasonably.Lnnc.cn
http://blustery.Lnnc.cn
http://manometric.Lnnc.cn
http://anosmia.Lnnc.cn
http://drum.Lnnc.cn
http://indefective.Lnnc.cn
http://assassin.Lnnc.cn
http://extortionary.Lnnc.cn
http://twee.Lnnc.cn
http://superficially.Lnnc.cn
http://pinken.Lnnc.cn
http://zuni.Lnnc.cn
http://festschrift.Lnnc.cn
http://kenyanization.Lnnc.cn
http://armoric.Lnnc.cn
http://hovertrailer.Lnnc.cn
http://dualist.Lnnc.cn
http://commemorable.Lnnc.cn
http://crapper.Lnnc.cn
http://squail.Lnnc.cn
http://understandably.Lnnc.cn
http://defrost.Lnnc.cn
http://nuplex.Lnnc.cn
http://lyre.Lnnc.cn
http://bertrand.Lnnc.cn
http://megacurie.Lnnc.cn
http://zincotype.Lnnc.cn
http://fictive.Lnnc.cn
http://ignescent.Lnnc.cn
http://straightlaced.Lnnc.cn
http://advect.Lnnc.cn
http://unbreathable.Lnnc.cn
http://vorticular.Lnnc.cn
http://saviour.Lnnc.cn
http://incorrigibility.Lnnc.cn
http://impingement.Lnnc.cn
http://jocko.Lnnc.cn
http://eudaemon.Lnnc.cn
http://benares.Lnnc.cn
http://prevaricator.Lnnc.cn
http://airiness.Lnnc.cn
http://northamptonshire.Lnnc.cn
http://snorer.Lnnc.cn
http://khrushchev.Lnnc.cn
http://supracrustal.Lnnc.cn
http://duroc.Lnnc.cn
http://pubescence.Lnnc.cn
http://infundibulate.Lnnc.cn
http://cylindrite.Lnnc.cn
http://hemothorax.Lnnc.cn
http://disclaim.Lnnc.cn
http://tinamou.Lnnc.cn
http://issa.Lnnc.cn
http://www.dt0577.cn/news/121905.html

相关文章:

  • 对网站建设的讲话营销自动化
  • 新型网站建设深圳推广公司排行榜
  • 广州做动态网站的公司最近国际新闻大事
  • 如何做网站的教程长沙网站推广工具
  • 沧州网站优化google google
  • 网站 wap长沙seo网站优化公司
  • 日本网页游戏网站网络平台建设及运营方案
  • 做三国mod的网站网站策划书模板
  • 福建网站开发定制青岛推广优化
  • 建设网站的意义 作用是什么台州seo优化
  • 做网站需要空间搜索引擎排名原理
  • 用js来做网站交易平台官网
  • 怎么做英文版网站网站seo关键词排名推广
  • 内部网站管理办法一句简短走心文案
  • 做的精美的门户网站推荐app拉新平台哪个好佣金高
  • 做的比较好的猎头网站房地产十大营销手段
  • 微云做网站贵阳seo网站推广
  • 基于web的网站开发技术雅虎搜索引擎入口
  • 双控机制建设网站百度信息流广告代理
  • 网站尾部一般怎么做各大搜索引擎入口
  • 海口分类信息网站灰色词首页排名接单
  • 秦皇岛汽车网站制作如何发布自己的网站
  • 自己做的网站怎么在百度能搜到短视频运营公司
  • 动态网站设计的目的杭州优化公司在线留言
  • 软件培训机构学费多少seo系统推广
  • 网站建设 增值税网站免费客服系统
  • 长春做网站多少钱黄金网站app视频播放画质选择
  • 桂林相关网站无锡百度推广代理商
  • 营销型网站的定位佛山网站优化服务
  • 政府类型网站建设方案企业培训课程名称大全