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

网站建设验收使用情况手机怎样做刷赞网站

网站建设验收使用情况,手机怎样做刷赞网站,珠海网站建设公司怎么样,制作手机广告的网站003讲到了导入jar包中的方法#xff0c;但其实是个半成品#xff0c;别人写的jar包中的方法我要在自己的代码中去调用#xff0c;非常的不方便。原则上写给别人用的jar包#xff0c;人家要能直接用#xff0c;而不用写注入的方法。 在springboot中会自动扫描imports文件中…003讲到了导入jar包中的方法但其实是个半成品别人写的jar包中的方法我要在自己的代码中去调用非常的不方便。原则上写给别人用的jar包人家要能直接用而不用写注入的方法。 在springboot中会自动扫描imports文件中的内容利用这一点进行自动注入的开发 以下是整个jar包的目录 Country // // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) //package cn.itcast.pojo;public class Country {private String name;private String system;public Country() {}public Country(String name, String system) {this.name name;this.system system;}public String getName() {return this.name;}public void setName(String name) {this.name name;}public String getSystem() {return this.system;}public void setSystem(String system) {this.system system;}public String toString() {return Country{name this.name , system this.system };} }Province // // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) //package cn.itcast.pojo;public class Province {private String name;private String direction;public Province() {}public Province(String name, String direction) {this.name name;this.direction direction;}public String getName() {return this.name;}public void setName(String name) {this.name name;}public String getDirection() {return this.direction;}public void setDirection(String direction) {this.direction direction;}public String toString() {return Province{name this.name , direction this.direction };} }CommonConfig // // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) //package cn.itcast.config;import cn.itcast.pojo.Country; import cn.itcast.pojo.Province; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean;public class CommonConfig {public CommonConfig() {}ConditionalOnProperty(prefix country,name {name, system})Beanpublic Country country(Value(${country.name}) String name, Value(${country.system}) String system) {return new Country(name, system);}Beanpublic Province province() {return new Province();} }CommonAutoConfig // // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) //package cn.itcast.config;import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Import;AutoConfiguration Import({CommonConfig.class}) public class CommonAutoConfig {public CommonAutoConfig() {} }xxx.imports cn.itcast.config.CommonAutoConfig 以上封装好的jar包就能自动注入了 接着在工程中引用 package com.geji;import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.ApplicationContext;/*** Hello world!**/ SpringBootApplication public class SpringbootAutoConfigApplication {public static void main( String[] args ){ApplicationContext context SpringApplication.run(SpringbootAutoConfigApplication.class,args);System.out.println(context.getBean(dispatcherServlet));System.out.println(context.getBean(province));} }以上是自动配置功能项目中也能用了但是在实际工作中会更进一步编写starter用来实现依赖管理功能这样的话给别人用的时候就更方便了 创建两个maven工程dmybatis-spring-boot-aotuconfiguredmybatis-spring-boot-starter dmybatis-spring-boot-aotuconfigure无所谓的跟上半篇一模一样 在dmybatis-spring-boot-aotuconfigure编写Porn.xml 在dmybatis-spring-boot-aotuconfigure编写自动配置类 编写可以给spring自动扫描的配置文件 以下文件没用到删了 dmybatis-spring-boot-starter引入dmybatis-spring-boot-aotuconfigure和dmybatis-spring-boot-aotuconfigure本身引入的其他包 dmybatis-spring-boot-starter只是个依赖管理删除其他文件 以上就完成了这样就能在其他项目中直接引入了
http://www.pierceye.com/news/123601/

相关文章:

  • 广西南宁市网站制作公司制作图片的软件加字体
  • 新手搭建网站教程品牌推广费用预算
  • 广州网站设计网站制作竞价托管多少钱
  • 创建企业营销网站包括哪些内容软考高项彻底没用了
  • 企业品牌网站建设方案无锡网站设计多少钱
  • 轻量级网站开发在线旅游网站平台有哪些
  • 怎么用vs做网站推广优化网站排名
  • 免费推广网站软件常宁网站建设常宁网站建设
  • 冀州市网站建设html编辑器安卓版手机版软件
  • 广州专业网站改版方案网站建设要做ui和什么
  • 做网站显示上次登录时间代码h5素材库
  • 比较有名的网站建设公司谷歌网站优化
  • 企业网站改版计划书中国制造网是做什么的
  • 非主营电子商务企业网站有哪些企业网项目建设实践
  • 颍东网站建设手机vi设计公司
  • 林哥seo网络营销seo培训
  • 如何面试网站开发网站制作交易流程
  • 绍兴网站建设冯炳良互联网营销
  • 制作企业网站怎么报价可以做我女朋友吗网站
  • 广西玉林网站建设正规公司建手机网站
  • 乐清网站制作公司招聘做私人网站 违法
  • 珠海电脑自己建网站电子商务排名
  • 怎样做网站的背景图片安卓原生开发
  • 现代电子商务网站建设技术wordpress采用的mvc
  • 台州网站建设团队如何申请建设网站域名
  • 资料查询网站建设桂林微代码网络科技有限公司
  • 做暖视频网站免费番禺网站制作技术
  • 如何做网站百度排名优化深圳市住房和建设网站
  • 汉沽做网站简单网站建设
  • 建信建设投资有限公司网站网站建设app小程序