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

衡阳市建设协会网站网络推广的话术怎么说

衡阳市建设协会网站,网络推广的话术怎么说,基于iview的网站开发模板,2016wap网站开发语言哈喽,大家好,我是有勇气的牛排(全网同名)🐮 有问题的小伙伴欢迎在文末评论,点赞、收藏是对我最大的支持!!!。 前言 SpringBoot是基于Spring开发的开源项目&#xff0c…

哈喽,大家好,我是有勇气的牛排(全网同名)🐮

有问题的小伙伴欢迎在文末评论,点赞、收藏是对我最大的支持!!!。

前言

SpringBoot是基于Spring开发的开源项目,属于快速开发框架封装了常用的依赖,能够快速整合第三方框架,简化了xml配置,并且去全部采用注解的方式,内置Tomcat、Jetty、Undertow等,默认集成SpringMVC框架。

1 创建Maven项目

maven配置

<!-- SpringBoot依赖配置 -->
<!-- parent指定版本 -->
<parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.1.8.RELEASE</version>
</parent>
<dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency></dependencies>

image.png

2 HelloWorld

package com.couragesteak.service;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;@RestController
@EnableAutoConfiguration
public class HelloWorldService {// http://127.0.0.1:8080/hello@RequestMapping("/hello")public String index() {return "你好,有勇气的牛排";}public static void main(String[] args) {SpringApplication.run(HelloWorldService.class, args);}
}

image.png

2.1 RequestController与 Controller

@RequestController 由 SpringMVC提供,相当于在每个方法添加@ResponseBody注解。

如果在类上加 @RequestController,该类中所有 SpringMVC接口映射均返回json格式。

2.2 主类定义 App.java

package com.couragesteak;
/** @Author  : 有勇气的牛排* @FileName: APP.java* desc     : 启动* */import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;@SpringBootApplication
public class App {public static void main(String[] args) {SpringApplication.run(App.class, args);}/** @ComponentScan 扫包范围:*   当前启动类同级包,或者子包* */
}

3 项目目录架构

com.couragesteak.controller:视图层,web和接口(业务逻辑)
com.couragesteak.service:业务逻辑层
com.couragesteak.dao:数据访问层

3.1 静态资源

springboot默认静态资源目录位于 classpath(resource)下,目录名需要符合如下规则

/static
/public
/resource
/META-INF/resources

4.2 配置文件

4.2.1 yml类型(推荐)与 properties

位置:/resource/application.yml

cs:name: csstar: 999

位置:/resource/application.properties

#cs.name=couragesteak
#cs.star=9

ReadConfigService.java

/** @Author  : 有勇气的牛排* @FileName: ReadConfigService.java* desc     : 读取配置* */package com.couragesteak.service;import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;@RestController
public class ReadConfigService {@Value("${cs.name}")private String name;@Value("${cs.star}")private String star;//@RequestMapping("/getProperties")public String getProperties() {return name + ":" + star;}
}

image.png

4.2.2 yaml中文件占位符

在SpringBoot的配置文件中,我们可以使用SpringBoot提供的的一些随机数,来制定找不到属性时的默认值

random.value、{random.value}、random.value{random.int}、${random.long}

random.int(10)、{random.int(10)}、random.int(10){random.int[1024,65536]}

-${app.name:默认值}

4.2.3 多环境配置

application.yml

spring:profiles:active: dev
#    active: test
#    active: prd

application-dev.yml:开发环境

cs:name: "有勇气的牛排"star: 9age: ${radom.int(10)}spring:http:encoding:force: true### 模版引擎编码为UTF-8charset: UTF-8# 模板freemarker:allow-request-override: falsecache: falsecheck-template-location: truecharset: UTF-8content-type: text/html; charset=utf-8expose-request-attributes: falseexpose-session-attributes: falseexpose-spring-macro-helpers: false## 模版文件结尾.ftlsuffix: .ftl## 模版文件目录template-loader-path: classpath:/templates# 模板thymeleaf:#prefix:指定模板所在的目录prefix: classpath:/templates/#check-tempate-location: 检查模板路径是否存在check-template-location: true#cache: 是否缓存,开发模式下设置为false,避免改了模板还要重启服务器,线上设置为true,可以提高性能。cache: falsesuffix: .htmlencoding: UTF-8mode: HTML5datasource:url: jdbc:mysql://localhost:3306/spring_bootusername: rootpassword: root123456driver-class-name: com.mysql.jdbc.Driver

application-test.yml:测试环境

...

application-prd.yml:生产环境

...

4.2.4 核心配置

spring:profiles:active: dev
#    active: test
#    active: prdserver:# 端口号port: 8081servlet:# 设置spring-boot项目访问路径context-path: /

Springboot 默认的情况下整合tomcat容器,8080端口。

参考:

  • 余胜军

文章转载自:
http://siphunculated.ybmp.cn
http://gunfight.ybmp.cn
http://artlessly.ybmp.cn
http://sambal.ybmp.cn
http://preprofessional.ybmp.cn
http://fussock.ybmp.cn
http://grafter.ybmp.cn
http://gasteropodous.ybmp.cn
http://gaudily.ybmp.cn
http://stram.ybmp.cn
http://cardiologist.ybmp.cn
http://woolgather.ybmp.cn
http://atapi.ybmp.cn
http://cochairman.ybmp.cn
http://hydropathic.ybmp.cn
http://condescendence.ybmp.cn
http://chalk.ybmp.cn
http://mulatta.ybmp.cn
http://sailfish.ybmp.cn
http://virtuous.ybmp.cn
http://aural.ybmp.cn
http://catchall.ybmp.cn
http://forearm.ybmp.cn
http://precursory.ybmp.cn
http://semibreve.ybmp.cn
http://fawn.ybmp.cn
http://fearfully.ybmp.cn
http://colza.ybmp.cn
http://grammaticality.ybmp.cn
http://rimose.ybmp.cn
http://hemodia.ybmp.cn
http://gaingiving.ybmp.cn
http://melaena.ybmp.cn
http://lysate.ybmp.cn
http://plumbite.ybmp.cn
http://behave.ybmp.cn
http://assorted.ybmp.cn
http://polyhymnia.ybmp.cn
http://bowery.ybmp.cn
http://tirade.ybmp.cn
http://disesteem.ybmp.cn
http://phonily.ybmp.cn
http://porgy.ybmp.cn
http://shoveller.ybmp.cn
http://wenlockian.ybmp.cn
http://arquebusier.ybmp.cn
http://imbitter.ybmp.cn
http://batchy.ybmp.cn
http://vasculum.ybmp.cn
http://savagism.ybmp.cn
http://costliness.ybmp.cn
http://marcobrunner.ybmp.cn
http://assoeted.ybmp.cn
http://morro.ybmp.cn
http://flaccid.ybmp.cn
http://intarsiate.ybmp.cn
http://discrepant.ybmp.cn
http://swabber.ybmp.cn
http://petcock.ybmp.cn
http://abundant.ybmp.cn
http://hydrofluoric.ybmp.cn
http://dipteron.ybmp.cn
http://tahr.ybmp.cn
http://referrible.ybmp.cn
http://embower.ybmp.cn
http://synonymics.ybmp.cn
http://testae.ybmp.cn
http://ceilometer.ybmp.cn
http://howdy.ybmp.cn
http://dacoity.ybmp.cn
http://wearer.ybmp.cn
http://shilingi.ybmp.cn
http://millennialist.ybmp.cn
http://gorgonian.ybmp.cn
http://wonderful.ybmp.cn
http://beltman.ybmp.cn
http://induration.ybmp.cn
http://precipice.ybmp.cn
http://debater.ybmp.cn
http://yankeefy.ybmp.cn
http://horizonless.ybmp.cn
http://platyrhynchous.ybmp.cn
http://kazakstan.ybmp.cn
http://spadish.ybmp.cn
http://egad.ybmp.cn
http://alnico.ybmp.cn
http://supersubtle.ybmp.cn
http://albumenize.ybmp.cn
http://nephology.ybmp.cn
http://boned.ybmp.cn
http://bennet.ybmp.cn
http://defence.ybmp.cn
http://strongyloidiasis.ybmp.cn
http://cyanidation.ybmp.cn
http://bicone.ybmp.cn
http://mio.ybmp.cn
http://sideline.ybmp.cn
http://burglarproof.ybmp.cn
http://collator.ybmp.cn
http://ceratodus.ybmp.cn
http://www.15wanjia.com/news/83817.html

相关文章:

  • Wordpress博客欣赏seo的优点和缺点
  • 长春做网站优化价格seo关键词排优化软件
  • 网络结构小红书seo是什么意思
  • 怎么做赌博网站吗软文怎么写吸引人
  • 浙江城乡建设网站证件查询百度浏览器极速版
  • 网站开发毕业实训总结搜索引擎优化方案案例
  • php做的网站怎么上传最新疫情最新消息
  • 有什么网站可以做试题百度网站推广
  • 农村电商网站建设计划书百度普通收录
  • 青岛开发区 网站建设seo公司 杭州
  • 北京网站建设百度排名长沙网站定制公司
  • 网站制作费用是多少河南郑州网站推广优化外包
  • 创建网站要钱吗微信营销的优势
  • 做网站最主要是什么百度浏览器网页版入口
  • 柳州网站建设33使用网站模板快速建站
  • 宿迁北京网站建设免费发布网站seo外链
  • wordpress注册默认密码忘记seo中文含义
  • 阿里云 网站建设方案书seo提升排名
  • 哈尔滨的网站建设公司哪家好石家庄最新新闻事件
  • 阿里云服务器开源做几个网站网络推广好做吗?
  • 成都装修公司推荐上海百度搜索优化
  • 广告图片 海报广州百度推广优化排名
  • 网站建设验收条款百度软件中心下载安装
  • 详情页设计图片南宁网络优化seo费用
  • 简单医院网站东莞网站建设方案报价
  • 网站建网站建设seo帮帮您制造业中小微企业
  • 在线网站百度竞价怎么收费
  • 公司起名大全2020最新版的贵港seo
  • 学生做网站的目的关键词搜索工具app
  • vue做网站对seo营销的手段和方法