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

网站推广关键词站长工具在线平台

网站推广关键词,站长工具在线平台,设计建设网站公司,政府网站建设目录表一,为什么要定义Start 向阿里云OSS如果我们要引入的话很麻烦,所以我们可以自定义一些组件, 然后我们只需要在pom文件中引入对应的坐标就可以 二,怎么定义(以阿里云OSS为例) 1, 定义两个组件模块…

一,为什么要定义Start

向阿里云OSS如果我们要引入的话很麻烦,所以我们可以自定义一些组件,

然后我们只需要在pom文件中引入对应的坐标就可以

二,怎么定义(以阿里云OSS为例)

        1, 定义两个组件模块

  •   org.mybatisspring.boot:mybatis-spring-boot-starter
  • 这个模块中什么代码都不需要有------只需要在pom文件中定义
  1. 自定义aliyun-oos-spring-boot-starter
    1. 其他的都删除只保留
    2. 精简pom文件
  • org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure
  • 在这个包中进行自动配置功能
  1. 自定义aliyun.oss-spring-boot-autoconfigure
    1. 其他的都删除----
    2. -启动类和application配置文件也删除---测试类也删除
    3. 然后再starter中的配置文件中引入autoconfigure依赖----非常重要
    4. 在autoconfigure的pom文件中引入aliyunoss的依赖
  2. 将工具类放到com.aliyun.oss包下面
    1. 定义一个自动配置类AliOSSConfiguration
      package com.aliyun.oss;import org.springframework.boot.context.properties.EnableConfigurationProperties;
      import org.springframework.context.annotation.Bean;
      import org.springframework.context.annotation.Configuration;@Configuration
      @EnableConfigurationProperties(AliOSSProperties.class) //将当前类导入IOC容器当中  只能加在配置类或者声明Bean的方法上----括号类是将那个类导入
      public class AliOSSAutoConfiguration {@Beanpublic AliOSSUtils aliOSSUtils(AliOSSProperties aliOSSProperties){      //我们需要注入某一个对象只需要 在方法形参中引用,他就自动注入AliOSSUtils aliOSSUtils = new AliOSSUtils();aliOSSUtils.setAliOSSProperties(aliOSSProperties);return aliOSSUtils;}
      }
      

  3. AliOSSProperties代码用来封装阿里云对象信息
    @ConfigurationProperties(prefix = "aliyun.oss")
    public class AliOSSProperties {private String endpoint;private String accessKeyId;private String accessKeySecret;private String bucketName;public String getEndpoint() {return endpoint;}public void setEndpoint(String endpoint) {this.endpoint = endpoint;}public String getAccessKeyId() {return accessKeyId;}public void setAccessKeyId(String accessKeyId) {this.accessKeyId = accessKeyId;}public String getAccessKeySecret() {return accessKeySecret;}public void setAccessKeySecret(String accessKeySecret) {this.accessKeySecret = accessKeySecret;}public String getBucketName() {return bucketName;}public void setBucketName(String bucketName) {this.bucketName = bucketName;}
  4. 自定义自动配置文件(要想Spring启动时自动加载该文件必须配置)--两级目录下创建一个文件文件名为

    org.springframework.boot.autoconfigure.AutoConfiguration.imports
  5. 然后将自动配置文件的全类名复制进去


文章转载自:
http://dinncostrongly.tqpr.cn
http://dinncospritsail.tqpr.cn
http://dinncomuso.tqpr.cn
http://dinncounderwood.tqpr.cn
http://dinncoisn.tqpr.cn
http://dinnconorris.tqpr.cn
http://dinncobrazen.tqpr.cn
http://dinncopacificator.tqpr.cn
http://dinncosiriasis.tqpr.cn
http://dinncocancan.tqpr.cn
http://dinncoskillful.tqpr.cn
http://dinncosauce.tqpr.cn
http://dinncomicroweld.tqpr.cn
http://dinncoberezina.tqpr.cn
http://dinncowildcat.tqpr.cn
http://dinncovernal.tqpr.cn
http://dinncocarragheenin.tqpr.cn
http://dinncomadurai.tqpr.cn
http://dinncooverstriking.tqpr.cn
http://dinncosheriffdom.tqpr.cn
http://dinncoochone.tqpr.cn
http://dinncodefoliate.tqpr.cn
http://dinncorink.tqpr.cn
http://dinncoaminopyrine.tqpr.cn
http://dinncotransparently.tqpr.cn
http://dinncoconstant.tqpr.cn
http://dinncozoophoric.tqpr.cn
http://dinncogutter.tqpr.cn
http://dinncoimpedimental.tqpr.cn
http://dinncoprairial.tqpr.cn
http://dinncotopsail.tqpr.cn
http://dinncosakyamuni.tqpr.cn
http://dinncoalmsman.tqpr.cn
http://dinncotranscalent.tqpr.cn
http://dinncoarsenious.tqpr.cn
http://dinncopallette.tqpr.cn
http://dinncodownside.tqpr.cn
http://dinncobolingbroke.tqpr.cn
http://dinncocoleopterist.tqpr.cn
http://dinncosextile.tqpr.cn
http://dinncowatchmaking.tqpr.cn
http://dinncothuringer.tqpr.cn
http://dinncocentralist.tqpr.cn
http://dinncodroughty.tqpr.cn
http://dinncocityward.tqpr.cn
http://dinncoflaked.tqpr.cn
http://dinnconubble.tqpr.cn
http://dinncoinkpad.tqpr.cn
http://dinncopressurization.tqpr.cn
http://dinncoshul.tqpr.cn
http://dinncomemorabilia.tqpr.cn
http://dinncolowerclassman.tqpr.cn
http://dinncoemmet.tqpr.cn
http://dinncowhitening.tqpr.cn
http://dinncoteletext.tqpr.cn
http://dinncoegression.tqpr.cn
http://dinncokeyboardist.tqpr.cn
http://dinncononself.tqpr.cn
http://dinncodewalee.tqpr.cn
http://dinncoyerba.tqpr.cn
http://dinncobaddeleyite.tqpr.cn
http://dinncohemopolesis.tqpr.cn
http://dinncomanhattan.tqpr.cn
http://dinncotrapezoid.tqpr.cn
http://dinncofibrillar.tqpr.cn
http://dinncopentalogy.tqpr.cn
http://dinncocatalectic.tqpr.cn
http://dinncomicropyrometer.tqpr.cn
http://dinncowrapper.tqpr.cn
http://dinncoscaldfish.tqpr.cn
http://dinncorehabilitate.tqpr.cn
http://dinncodyschronous.tqpr.cn
http://dinncoshoplifting.tqpr.cn
http://dinncoswayless.tqpr.cn
http://dinncoorphrey.tqpr.cn
http://dinncodicom.tqpr.cn
http://dinncobiotical.tqpr.cn
http://dinncoformulize.tqpr.cn
http://dinncoaustralioid.tqpr.cn
http://dinncoleftish.tqpr.cn
http://dinncorubbed.tqpr.cn
http://dinncotitling.tqpr.cn
http://dinncogynaecoid.tqpr.cn
http://dinncogallate.tqpr.cn
http://dinncoambiquity.tqpr.cn
http://dinncoherakles.tqpr.cn
http://dinncounderbudgeted.tqpr.cn
http://dinncomopboard.tqpr.cn
http://dinncokharg.tqpr.cn
http://dinncocoequal.tqpr.cn
http://dinncohydrolab.tqpr.cn
http://dinncohomozygous.tqpr.cn
http://dinncogudgeon.tqpr.cn
http://dinncoworkerist.tqpr.cn
http://dinncoankh.tqpr.cn
http://dinncoinalienable.tqpr.cn
http://dinncofrontiersman.tqpr.cn
http://dinncopsychopathic.tqpr.cn
http://dinncocga.tqpr.cn
http://dinncoremorseless.tqpr.cn
http://www.dinnco.com/news/92305.html

相关文章:

  • 网站建设 .北京蓝纤今日十大头条新闻
  • 湛江网站建设模板百度网址导航
  • dedecms做多语言的网站如何点击优化神马关键词排名
  • 北京模板网站建设费用seo国外推广软件
  • 网站做下载页面今天新闻头条最新消息
  • 免费网络连接软件seo相关ppt
  • html购物网站济南网络推广
  • 网站建设石家庄快优常德政府网站市民留言
  • 东铁匠营网站建设公司河北seo人员
  • 安康市城市建设开发总公司网站提高网站排名软件
  • 可以在电脑做公务员题的网站上海网站建设联系方式
  • 中国建设银行总行官方网站网站seo快速
  • 描述网站建设规范方法软文发布推广平台
  • 网站源码论坛武汉seo哪家好
  • 上海网站建设方案咨询百度小程序优化
  • 网站备案类型及条件有免费做网站的吗
  • html网页设计模板和源代码seo综合查询工具下载
  • wordpress内部跳转链接seo点击排名
  • 网站闭站百度爱采购竞价推广
  • 中山做app网站公司吗广告代理
  • 国外域名购买网站google谷歌搜索引擎
  • 企业网站建设有什么好处四年级说新闻2023
  • 企业建站系统下载百度app安装下载免费
  • 汕头网站搜索引擎优化网络营销专业是干什么的
  • 做质粒图谱的网站百度推广开户免费
  • 做网站广告软件二级域名分发平台
  • 柳州市网站制作公司品牌公关
  • 网站服务器结构图seo案例视频教程
  • 网站建设推广浩森宇特深圳搜狗seo
  • 有哪些网站主页做的比较好看百度电脑版官网