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

网站建设哪个平台好网页制作接单

网站建设哪个平台好,网页制作接单,做的王者荣耀钓鱼网站,免费自己制作logo的网站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/232318/

相关文章:

  • 网站管理员功能wordpress增加购物车
  • 外国广告公司网站一个wordpress的爱好者
  • 锦溪网站建设怎么查看网站是否被收录
  • 网站建设感悟平面设计在哪里接单
  • 网站建设中html网页软件开发定制外包服务商
  • 山东seo网站推广河南定制网站建设企业
  • 网站建设文献文档单产品网站建设
  • 唐山网站建设自主开发宁波北仑做公司网站
  • 廊坊网页模板建站专业网站建设公司排名
  • 广州本地生活appseo百度百科
  • 成都产品网站建设镜像网站是怎么做的
  • 网站建设需求分析范例中国建设信息网站
  • 提供网站建设工具的品牌如何自己开个网站平台
  • 站长工具seo综合查询怎么去掉百家号查询排名数据查询
  • 网站怎么做商家定位注册网站不用手机短信验证的网站
  • 郑州医疗网站建设线下推广团队
  • 合肥网站推广 公司哪家好阿里云注销网站
  • 手机网站调用分享网站用户体验存在问题
  • 淘宝网官方网站路飞和女帝做h的网站
  • app网站设计制作360网站 备案
  • 网站建设多久能学会内丘网站建设案例
  • 网站设计要素 优帮云卖东西专业网站网上
  • 做古风人物小图的网站或软件东莞附近的网络推手公司
  • 东莞专业的单位网站建设江苏网站建设定制
  • 宁夏建设工程造价站网站东营网站seo外包
  • 推销网站建设今天重大新闻文字
  • 网站上线过程网站开发系统需求说明书
  • it外包行业江门seo网络推广
  • 深圳石岩建网站判断网站模板版本
  • 梅州市住房和城乡建设局网站东营网站