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

从seo角度去建设网站房地产网站开发

从seo角度去建设网站,房地产网站开发,个人crm管理系统,义乌微硕网络科技有限公司第一步需要在pom.xml文件指定需要导入的坐标 要是没有自动提示需要检查maven有没有 实现代码 /*springboot第三方自动配置实现方法 * 什么是自动配置 自动配置就是springboot启动自动加载的类不需要在手动的控制反转自动的加入bean中 * * *//*第一种方案包扫描 不推荐因为繁琐…第一步需要在pom.xml文件指定需要导入的坐标 要是没有自动提示需要检查maven有没有 实现代码 /*springboot第三方自动配置实现方法 * 什么是自动配置 自动配置就是springboot启动自动加载的类不需要在手动的控制反转自动的加入bean中 * * *//*第一种方案包扫描 不推荐因为繁琐自己也没有试成功过加在启动类上 ComponentScan({com.example,com.example.comtihmabc2}*//* 第二种方案Import注解导入加在启动类上 Import({HeaderParser.class}) 导入普通类交给I0C容器管理Import({HeaderConfig.class})//导入配置类交给I0C容器管理 示例代码 Configuration public class HeaderConfig {Beanpublic HeaderParser headerParser(){ return new HeaderParser();}Beanpublic HeaderGenerator headerGenerator(){ return new HeaderGenerator(); } } Import({MyImportSelector.class})//导入Importselector接口实现类 第三方所实现的接口ImportSelector 里面清楚的写明白了需要导入的类位置 示例代码 public class MyImportSelector implements ImportSelector {public String[] selectImports(AnnotationMetadata importingClassMetadata) {return new String[]{com.example.HeaderConfig};} *//*第三种方案自定义注解EnableHeaderConfig加在启动类上 第三方自定义注解示例代码 Retention(RetentionPolicy.RUNTIME) Target(ElementType.TYPE) Import(MyImportSelector.class)//MyImportSelector.class表示所要导入的类可以是配置类 public interface EnableHeaderConfig { } * */SpringBootApplication public class ComTihmaBc2Application {public static void main(String[] args) {SpringApplication.run(ComTihmaBc2Application.class, args);}}执行代码示例 SpringBootTest class ComTihmaBc2ApplicationTests {// //1.获取I0c容器对象 // Autowired // ApplicationContext applicationContext;Autowired //手动依赖注入ApplicationContext applicationContext ;// Test // void contextLoads() { // applicationContext.getBean(HeaderParser.class).parse(); // }Testvoid contextLoads1() {applicationContext.getBean(HeaderGenerator.class).generate();}}自动装配条件判断 /*springboot自动配置条件判断注解满足条件才会执行 通常声名在类上或者方法上 * springboot底层自动配置就是用此方法 * */ Configuration public class HeaderConfig {//注解1/*判断环境中是否有对应字节码文件才注册bean到I0C容器。可通过类型value或者名字name来进行判断示例1 ConditionalOnClass(name io.jsonwebtoken.Jwts) 名字name示例2 ConditionalOnClass(value HeaderParser.class ) 通过类型value*///注解2/* ConditionalOnMissingBean 当不存在当前类型的bean时才声明该bean才加入ioc容器 ---也可以指定类型(value属性)或 名称(name属性)没有就是当前 比如ConditionalOnMissingBeanpublic HeaderParser headerParser(){ return new HeaderParser();}*/ /* ConditionalOnProperty(name name,havingValue itheima) 配置文件中存在对应的属性和值才注册bean到I0C容器比如application.properties 配置文件中 # 应用服务 WEB 访问端口 server.port8080 nameitheima 有就可以执行*/BeanConditionalOnProperty(name name,havingValue itheima)public HeaderParser headerParser(){ return new HeaderParser();}Beanpublic HeaderGenerator headerGenerator(){ return new HeaderGenerator(); } }
http://www.w-s-a.com/news/882313/

相关文章:

  • 做管理信息的网站com域名查询
  • 免费推广网站推荐外贸推广平台哪个好
  • 腾宁科技做网站399元全包企业校园网站建设
  • 海外医疗兼职网站建设公司取名字大全免费
  • 龙口市规划建设局网站vi设计和品牌设计的区别
  • 企业网站的总体设计网站建设评审验收会议主持词
  • 网站建设完成推广响应式网站设计开发
  • 电商网站用php做的吗网站开发流程可规划为那三个阶段
  • flash网站怎么做音乐停止深圳网站建设金瓷网络
  • 哪个网站可以做房产信息群发怎么做国内网站吗
  • 微商城网站建设公司的价格卖磁铁的网站怎么做的
  • 免费做做网站手机平台软件开发
  • 网站单页做301徐州百度网站快速优化
  • 织梦怎么制作手机网站漳州专业网站建设公司
  • 邓州做网站网络优化概念
  • 查看网站开发phonegap wordpress
  • 网站建设和维护待遇怎样c 做的网站又哪些
  • 淮南网站推广网站开发行业前景
  • 丽水市龙泉市网站建设公司江门手机模板建站
  • 做化妆品注册和注册的网站有哪些wordpress加关键字
  • 四川新站优化php笑话网站源码
  • 外贸类网站酷玛网站建设
  • 合肥网站设计建设南宁网站seo推广优化公司
  • 临沂百度网站7x7x7x7x8黄全场免费
  • 海洋牧场网站建设大良网站设计价格
  • 手机端网站关键字排名北京seo公司哪家好
  • 福建建设培训中心网站网站建站服务公司地址
  • 青岛网站优化快速排名企业网址怎么整
  • 做公司网站用什么系统seo搜索排名优化方法
  • dw怎么做网站标题图标做网站重庆