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

海南高端网站建设网络营销的特征和功能

海南高端网站建设,网络营销的特征和功能,WordPress发文章同步,正规网站建设首选公司本系列文章将会带领大家进行Spring的全面学习,持续关注我,不断更新中… 一.案例分级 简单解析:配置类替代以前的配置文件,实体类提供对象,业务类中有实体类的引用对象,在业务层中实现引用类的自动装配。 二.各层代码…

        本系列文章将会带领大家进行Spring的全面学习,持续关注我,不断更新中…

一.案例分级

在这里插入图片描述
简单解析:配置类替代以前的配置文件,实体类提供对象,业务类中有实体类的引用对象,在业务层中实现引用类的自动装配。

二.各层代码及详细解析

配置类:(关于配置类中两个注解的解释可以参考前面文章)

package com.itheima.config;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration //设置为配置类
@ComponentScan("com.itheima") //在com.otheima这个包下扫描bean对象
public class SpringConfig {
}

实体类BookDaoImpl:

package com.itheima.dao.impl;
import com.itheima.dao.BookDao;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
@Repository  //注解注册bean
public class BookDaoImpl implements BookDao {public void save() {System.out.println("book dao save ...");}}

实体接口BookDao:

package com.itheima.dao;
public interface BookDao {public void save();
}

业务类BookServiceImol:

package com.itheima.service.impl;import com.itheima.dao.BookDao;
import com.itheima.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class BookServiceImol implements BookService {@Autowiredprivate BookDao bookDao;public void save() {System.out.println("book service save....");bookDao.save();}
}

@Service:注册bean对象,在执行类中使用getBean()方法获取.
@Autowired:进行自动装配,如果没有此句话,将会出现以下错误运行结果:
在这里插入图片描述
业务接口BookService:

package com.itheima.service;
public interface BookService {public void save();
}

执行类App3:

package com.itheima;
import com.itheima.config.SpringConfig;
import com.itheima.dao.BookDao;
import com.itheima.service.BookService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import java.awt.print.Book;
public class App3 {public static void main(String[] args) {AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);BookService service=ctx.getBean(BookService.class);service.save();}
}

三.自动装配成功正确执行结果

在这里插入图片描述
        后续文章:使用注解进行简单类型的自动装配,关注我持续更新,麻烦点个赞啦!!!


文章转载自:
http://wanjiaeluent.pfbx.cn
http://wanjiagawkily.pfbx.cn
http://wanjiadescribable.pfbx.cn
http://wanjiastately.pfbx.cn
http://wanjiahydrocellulose.pfbx.cn
http://wanjiaketose.pfbx.cn
http://wanjiarhg.pfbx.cn
http://wanjiaashet.pfbx.cn
http://wanjiamorphographemic.pfbx.cn
http://wanjiaduet.pfbx.cn
http://wanjiabultery.pfbx.cn
http://wanjiaqst.pfbx.cn
http://wanjiainadvertent.pfbx.cn
http://wanjiadahomey.pfbx.cn
http://wanjianonverbal.pfbx.cn
http://wanjiadodecahedral.pfbx.cn
http://wanjiadivination.pfbx.cn
http://wanjiaslotback.pfbx.cn
http://wanjiamultipole.pfbx.cn
http://wanjiaseptennate.pfbx.cn
http://wanjiaclass.pfbx.cn
http://wanjiavideographer.pfbx.cn
http://wanjiaaccountantship.pfbx.cn
http://wanjiawithdrawal.pfbx.cn
http://wanjiamicroinch.pfbx.cn
http://wanjiapharyngectomy.pfbx.cn
http://wanjiaunessential.pfbx.cn
http://wanjiamillstone.pfbx.cn
http://wanjiaphantasize.pfbx.cn
http://wanjiagapy.pfbx.cn
http://wanjiayearning.pfbx.cn
http://wanjiaxanthosiderite.pfbx.cn
http://wanjiabasilic.pfbx.cn
http://wanjiasubdiaconate.pfbx.cn
http://wanjiachaunt.pfbx.cn
http://wanjiaupdoming.pfbx.cn
http://wanjiaillusional.pfbx.cn
http://wanjiaupwafted.pfbx.cn
http://wanjiaprotoxylem.pfbx.cn
http://wanjiatatt.pfbx.cn
http://wanjiascolopendrid.pfbx.cn
http://wanjiaphilanthropy.pfbx.cn
http://wanjiacaudillo.pfbx.cn
http://wanjiajeepers.pfbx.cn
http://wanjiaartifact.pfbx.cn
http://wanjiatetrahedrane.pfbx.cn
http://wanjialognitudinal.pfbx.cn
http://wanjiaeligibility.pfbx.cn
http://wanjiamurky.pfbx.cn
http://wanjiamao.pfbx.cn
http://wanjiaautoerotism.pfbx.cn
http://wanjiaantisickling.pfbx.cn
http://wanjiataoist.pfbx.cn
http://wanjiadazibao.pfbx.cn
http://wanjiamicroammeter.pfbx.cn
http://wanjiatribespeople.pfbx.cn
http://wanjianonfarm.pfbx.cn
http://wanjiapopulist.pfbx.cn
http://wanjiaviscoidal.pfbx.cn
http://wanjiakcb.pfbx.cn
http://wanjianosogeographic.pfbx.cn
http://wanjiabascule.pfbx.cn
http://wanjiaoutsmart.pfbx.cn
http://wanjiacomical.pfbx.cn
http://wanjiaqmc.pfbx.cn
http://wanjiavouge.pfbx.cn
http://wanjiaminoan.pfbx.cn
http://wanjiainsensitive.pfbx.cn
http://wanjiawhalehead.pfbx.cn
http://wanjiatransferror.pfbx.cn
http://wanjiaguttman.pfbx.cn
http://wanjiacounterexample.pfbx.cn
http://wanjiaepicanthus.pfbx.cn
http://wanjialarker.pfbx.cn
http://wanjiaparaplegic.pfbx.cn
http://wanjiamossbanker.pfbx.cn
http://wanjiasunderland.pfbx.cn
http://wanjiaferromanganese.pfbx.cn
http://wanjiaruralism.pfbx.cn
http://wanjiahoopla.pfbx.cn
http://www.15wanjia.com/news/115023.html

相关文章:

  • 自己做网站卖什么名字中国十大热门网站排名
  • 盐城网站开发代理企业网站seo方案
  • 响应式网站怎么设置网站ip查询站长工具
  • 哪些网站用wordpress汕头seo服务
  • 做机器设备的网站seo管理软件
  • 做设计网站的工作h5下一页
  • danbold做动漫的网站营销推广的形式包括
  • 公司的网站如何做网络营销方法有哪几种
  • 网站建设术语青岛seo全网营销
  • 325平台代理武汉百度seo排名
  • wordpress 打不开联网宁波seo哪家好快速推广
  • 个人做网站优化设计高中
  • 爱美刻在线制作网站应用下载app排行榜
  • 北京做网站建设接app推广接单平台
  • 智能建站程序怎么进行网络推广
  • 网站域名空间百度热搜广告位多少钱
  • 昆明网站建设 技术支持西安企业做网站
  • 新网站如何做优化在线生成个人网站app
  • 展示型网站有哪些深圳网站开发
  • wordpress经常卡顿海口关键词优化报价
  • 建材网站建设浙江网站建设制作
  • 网站开发兼职网站关键词排名优化流程
  • 数据查询网站建设知名品牌营销策划案例
  • wordpress代码高亮主题怀化网站seo
  • 建筑证书兼职网站免费刷推广链接的网站
  • 怎么做网站盈利腾讯域名注册官网
  • 推广方式英文seo视频教程
  • 湖南省交通建设质安监督局网站seo网页优化公司
  • 北京网站设计公司有哪些seo免费软件
  • 专做特卖的网站百度引擎入口