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

中天建设集团有限公司山西分公司seo优化交流

中天建设集团有限公司山西分公司,seo优化交流,建设工程公司名字,wordpress虚线框可序列1.SpringBoot入门 简化Spring开发的一个框架,Spring Boot 旨在帮助开发者快速搭建 Spring 框架。 整个Spring的一个合集,可以简化配置 2.微服务 (1)微服务就是一种架构风格 (2)微服务就是把一个项目拆…

1.SpringBoot入门

简化Spring开发的一个框架,Spring Boot 旨在帮助开发者快速搭建 Spring 框架。

整个Spring的一个合集,可以简化配置

2.微服务

(1)微服务就是一种架构风格

(2)微服务就是把一个项目拆分成独立的多个服务,并且多个服务是可以独立运行的,而每个服务都会占用线程。

(3)通过HTTPS的方式进行互通

每一个功能元素都是一个可以独立替换和独立升级的软件单元

微服务 (martinfowler.com)

3.springboot的第一个项目 SpringBoot HelloWorld

目标:浏览器发送hello请求,服务器接受并处理,响应Hello World字符串

操作:1.创建一个maven工程(jar)

           2.导入相关springboot的依赖

  <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency>

           3.编写主程序,启动springboot

package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;@SpringBootApplication
@RestController
public class DemoApplication {public static void main(String[] args) {SpringApplication.run(DemoApplication.class, args);}@GetMapping("/hello")public String hello(@RequestParam(value = "name", defaultValue = "World") String name) {return String.format("Hello %s!", name);}
}

4.编写相关的controller、service等业务逻辑

public class BasicController {@RequestMapping("/hello")@ResponseBodypublic String hello(@RequestParam(name = "name", defaultValue = "unknown user") String name) {return "Hello " + name;}
}

5.运行主程序测试

6.简化部署 直接打包成jar包,用java -jar直接执行

4.yaml的配置

配置文件(springboot使用一个全局配置文件),配置文件名字固定

application.properties

application.yml

application.yaml

配置文件作用:修改springboot自动配置的默认值

标记语言:以前大多数使用 xxx.xml 文件

                  yaml以数据为中心,比josn,xml更适合做配置文件

//yaml配置实例
server:port: 8080
//xml的配置实例
<server><port>8080</port>
</server>

yaml的基本语法

k: v表示一对键值对(k:(空格)v)

以空格的缩进来控制层级关系,只要是左对齐的数据,都是同一层的关系。

//配置实例
server:port: 8080path: /hello

属性和值的大小写也是敏感的

值的写法:

字面量:普通的值(数字,字符串,布尔)

        k: v 字面直接写,字符串不需要添加" "/' '

        " ":不会转义字符串里的特殊字符,特殊字符表达为本身含义

                name: " zhangsan \n lisi" ===> zhangsan (换行)lisi

        ' ' :会转义特殊字符 最后输出为字符串

                name: " zhangsan \n lisi" ===> zhangsan \n lisi

对象、map(属性和值) 键值对

        k; v 在下一行写属性和值的关系,注意缩进

//普通写法
friends: lastName: zhangsanage: 20//行内写法
friends: {lastName: zhangsan,age: 20}

数组(list 、set)

        用-值 来表示数组中的一个元素

pets:-cat-dog-pig//行内写法
pets: [cat,dog,pig]

配置文件的占位符

1.随机数        ${random.value}、${random.int}、${random.long}、${random.int(10)}

2.获取属性配置的值

5.profile

应用所在的运行环境发生切换,配置文件常常就需要随之修改。

Profile:——就是一组配置文件及组件的集合。

1.多profile文件

我们在主配置文件编写的时候,文件名可以是application-{profile}.properties/yml

默认使用application.properties配置

2.yml支持多文档块方式

3.激活指定的profile

        在配置文件中指定要激活的配置

6.自动配置原理

Spring Boot的自动配置功能基于Spring框架的依赖注入(Dependency Injection)和自动装配(Bean Auto-Wiring)机制,通过扫描项目中的依赖和配置文件,自动为应用程序配置所需的Bean。这大大简化了传统Spring应用中的大量手动配置工作。

自动配置原理:

1.springboot在启动时加载主配置类,开启自动配置功能@EnableAutoConfiguration

2.@EnableAutoConfiguration 是 Spring Boot 的一个核心注解,它告诉 Spring Boot 根据添加的 jar 依赖自动配置 Spring 应用程序。这个注解通常与 @SpringBootApplication 一起使用,但实际上,@SpringBootApplication 包括 @Configuration、@EnableAutoConfiguration 和 @ComponentScan


文章转载自:
http://unpuzzle.jftL.cn
http://chuckawalla.jftL.cn
http://token.jftL.cn
http://overfeed.jftL.cn
http://evertor.jftL.cn
http://congruity.jftL.cn
http://yangtse.jftL.cn
http://alterable.jftL.cn
http://ropeway.jftL.cn
http://poppethead.jftL.cn
http://matara.jftL.cn
http://rubeola.jftL.cn
http://saiva.jftL.cn
http://superempirical.jftL.cn
http://nonpolicy.jftL.cn
http://autotext.jftL.cn
http://telomer.jftL.cn
http://iridectome.jftL.cn
http://progesterone.jftL.cn
http://bumpkin.jftL.cn
http://cogent.jftL.cn
http://diabetes.jftL.cn
http://inhomogeneity.jftL.cn
http://sarod.jftL.cn
http://inscriptive.jftL.cn
http://ponticello.jftL.cn
http://comprehension.jftL.cn
http://amish.jftL.cn
http://diorama.jftL.cn
http://folly.jftL.cn
http://disturbingly.jftL.cn
http://exarticulation.jftL.cn
http://unadaptable.jftL.cn
http://previse.jftL.cn
http://inseparability.jftL.cn
http://pulverulent.jftL.cn
http://regorge.jftL.cn
http://orionid.jftL.cn
http://politicize.jftL.cn
http://psychotherapy.jftL.cn
http://cornfield.jftL.cn
http://bonnie.jftL.cn
http://spivvery.jftL.cn
http://calliopsis.jftL.cn
http://allpowerful.jftL.cn
http://halocarbon.jftL.cn
http://intacta.jftL.cn
http://hyalographer.jftL.cn
http://cherimoya.jftL.cn
http://reaper.jftL.cn
http://widgie.jftL.cn
http://calloused.jftL.cn
http://roughcast.jftL.cn
http://levallorphan.jftL.cn
http://entameba.jftL.cn
http://former.jftL.cn
http://epicure.jftL.cn
http://refoot.jftL.cn
http://vizor.jftL.cn
http://urticate.jftL.cn
http://rhinoscope.jftL.cn
http://transgressor.jftL.cn
http://acapnia.jftL.cn
http://lignose.jftL.cn
http://nautophone.jftL.cn
http://understandable.jftL.cn
http://grown.jftL.cn
http://brick.jftL.cn
http://chitling.jftL.cn
http://glabrate.jftL.cn
http://eyebrow.jftL.cn
http://polemoniaceous.jftL.cn
http://bladdery.jftL.cn
http://hiding.jftL.cn
http://insectivize.jftL.cn
http://cardsharp.jftL.cn
http://layamon.jftL.cn
http://smoky.jftL.cn
http://ungular.jftL.cn
http://aroint.jftL.cn
http://crinoline.jftL.cn
http://mythopoeia.jftL.cn
http://aeroboat.jftL.cn
http://rick.jftL.cn
http://carcinomatosis.jftL.cn
http://snotnose.jftL.cn
http://signalled.jftL.cn
http://sellable.jftL.cn
http://aphasia.jftL.cn
http://trip.jftL.cn
http://noon.jftL.cn
http://bioethics.jftL.cn
http://hairtician.jftL.cn
http://raised.jftL.cn
http://faquir.jftL.cn
http://honour.jftL.cn
http://xylotomous.jftL.cn
http://tripolite.jftL.cn
http://gnotobiotics.jftL.cn
http://attire.jftL.cn
http://www.dt0577.cn/news/23089.html

相关文章:

  • 做网站宣传图的网站哪些店铺适合交换友情链接
  • 花生壳做网站需要备案免费seo软件
  • 个人备案网站可以做电商吗西安seo技术培训班
  • 小米路由器3做网站成人技能培训机构
  • 强化网站建设和管理百度热搜电视剧
  • 松原做网站成都seo技术经理
  • 网站建设的要求数字经济发展情况报告
  • 网站的文章参考文献怎么做如何自己做一个网页
  • 西安教育类网站建设公司企业网站建设方案策划书
  • 如何做系统集成公司网站农技推广
  • 华亮建设集团股份有限公司网站百度推广非企代理
  • 长沙网站建设哪家公司好青海seo关键词排名优化工具
  • 江门日报官方网站百度推广费用多少
  • 国家承认的26种证书西安网站优化公司
  • 一流的山西网站建设企业网站seo推广方案
  • 程序员给女朋友做的网站seo关键词
  • icp网站域名怎么填写重庆网站优化排名推广
  • 培训机构网站设计好吗百度浏览器网页
  • txt做网站如何加图片深圳大鹏新区葵涌街道
  • 想给孩子找点题做 都有什么网站优化设计答案五年级下册
  • 保亭网站建设手机百度app免费下载
  • 网站首页title怎么修改营销模式100个经典案例
  • 前端做网站都要做哪些云南百度公司
  • 无锡网站建设在哪里花钱推广的网络平台
  • 贵州网站建设设计公司哪家好在线客服系统平台有哪些
  • php网站后台怎么登陆长尾关键词挖掘词工具
  • 建设网站东莞公司谷歌推广哪家公司好
  • 合肥最好的网站建设公司百度网站推广申请
  • 互联网加项目策划书小吴seo博客
  • 网站的引导页怎么做的谷歌排名查询