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

二级域名做非法网站互联网推广平台有哪些公司

二级域名做非法网站,互联网推广平台有哪些公司,可以做微信推送的网站,向国旗敬礼 做新时代好少年网站1.Qualifier:通常与Autowired搭配使用,通过指定具体的beanName来注入相应的bean 当容器中有多个类型相同的Bean时,可以使用Qualifier注解来指定需要注入的Bean。Qualifier注解可以用于字段、方法参数、构造函数参数等位置 Service public cl…

1.@Qualifier:通常与@Autowired搭配使用,通过指定具体的beanName来注入相应的bean

当容器中有多个类型相同的Bean时,可以使用@Qualifier注解来指定需要注入的Bean。@Qualifier注解可以用于字段、方法参数、构造函数参数等位置

@Service
public class UserService {@Autowired@Qualifier("userServiceImpl")private UserMapper userMapper ;public User getUserById(Int id) {return userRepository.findById(id).orElse(null);}// Other business methods...
}

上面的示例中,@Qualifier注解用于指定需要注入的Bean的名称为“userServiceImpl”。需要注意的是,@Qualifier注解通常与@Autowired或@Inject注解一起使用,用于在多个匹配的Bean中进行选择。

如果没有指定@Qualifier注解,Spring框架将使用默认的自动装配策略,即按照类型进行匹配。如果有多个类型相同的Bean,Spring框架将抛出异常。

因此,使用@Qualifier注解可以有效地解决这个问题。

2.@Bean是一个注解,用于告诉 Spring 框架将标注的方法返回的对象注册为一个 Bean(组件)

具体的作用:

①.使用 @Bean 注解可以将方法返回的对象注册为一个 Bean,并且该 Bean 会被 Spring 容器管理

②.依赖注入:当其他组件需要使用这个 Bean 时,Spring 框架会自动将该 Bean 注入到相应的位置,实现依赖注入

③.自定义组件配置:通过 @Bean 注解可以对 Bean 进行自定义配置,例如设置属性值、初始化方法、销毁方法等

④.替代 XML 配置:需要通过 XML 配置文件来定义和配置 Bean,而现在通过 @Bean 注解可以在 Java 代码中实现同样的功能,避免了繁琐的 XML 配置

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cloud.bus.auto.mapper.IUserMapper"><resultMap id="BaseResultMap" type="com.cloud.bus.common.entity.TUser"><id column="ID" jdbcType="VARCHAR" property="id" /><result column="ACCT_SCOPE" jdbcType="VARCHAR" property="acctScope" /><result column="CONFIG_STATUS" jdbcType="VARCHAR" property="configStatus" /><result column="IS_MERGE" jdbcType="VARCHAR" property="isMerge" /><result column="LAST_ACCT_DATE" jdbcType="DATE" property="lastAcctDate" /><result column="HAPPENED_YEAR" jdbcType="VARCHAR" property="happenedYear" /></resultMap><sql id="Base_Column_List">ID, HOSPITAL_ID, ACCT_SCOPE, CONFIG_STATUS, IS_MERGE, SCHEDULE_ACCT_DATE,LAST_ACCT_DATE,LAST_OPERATE_DATE,HAPPENED_YEAR</sql><update id="updateUser">update T_User<set><if test="hospitalId != null and hospitalId != ''">HOSPITAL_ID = #{hospitalId,jdbcType=VARCHAR},</if>//.......<if test="runAcctDate != null and runAcctDate != ''">RUN_ACCT_DATE = #{runAcctDate,jdbcType=VARCHAR},</if></set>where ID = #{id,jdbcType=VARCHAR}</update><select id="queryUserList" resultType="com.cloud.bus.common.vo.UserVO">select<include refid="Base_Column_List"/>from T_User<include refid="Example_Where_Clause"/></select><sql id="Example_Where_Clause"><trim prefix="where" prefixOverrides="and|or"><if test="hospitalId != null and hospitalId != ''">and HOSPITAL_ID = #{hospitalId,jdbcType=VARCHAR}</if><if test="operatorType != null and operatorType != ''">and OPERATOR_TYPE = #{operatorType,jdbcType=VARCHAR}</if><if test="acctScope != null and acctScope != ''">and ACCT_SCOPE = #{acctScope,jdbcType=VARCHAR}</if>     </trim></sql>
</mapper>

3.@Configuration 注解的主要作用是指示Spring容器,该类是一个配置类,它包含了一个或多个Spring容器所需的bean定义。

这意味着@Configuration 注解用于定义Spring应用程序的配置信息,通常在Java类中进行配置而不是在XML文件中

@Configuration 注解的作用包括

①.定义Bean:在@Configuration 注解的类中,您可以使用@Bean 注解来定义一个或多个bean。这些bean将被Spring容器托管,可以在应用程序中使用

②.组织配置@Configuration 注解使您能够将应用程序的配置集中到一个或多个Java类中,以便更好地组织和管理配置信息。这有助于提高代码的可维护性和可读性

③.替代XML配置@Configuration 注解可以用来替代传统的XML配置文件。通过使用Java类来配置应用程序,您可以获得更强的类型安全性,并且可以利用Java的特性,如条件化配置、注解等

④.支持自动装配:@Configuration 注解通常与@Autowired 注解一起使用,以实现自动装配(依赖注入)。当一个配置类被Spring容器扫描到时,其中的@Bean 方法将被调用,创建bean实例,并自动装配它们的依赖关系。

⑤.集成外部配置:通过@Configuration 注解,您可以将外部配置(如属性文件或环境变量)与应用程序的配置进行集成。Spring提供了@PropertySource 注解来加载外部属性文件,以及@Value 注解来注入属性值


@Configuration
public class ApplicationConfig {@Beanpublic UserService userService() {return new UserServiceImpl();} 
}


文章转载自:
http://unifiable.tyjp.cn
http://enate.tyjp.cn
http://mort.tyjp.cn
http://chrysoprase.tyjp.cn
http://veinlet.tyjp.cn
http://kifi.tyjp.cn
http://elusion.tyjp.cn
http://cricetid.tyjp.cn
http://nutrimental.tyjp.cn
http://molasses.tyjp.cn
http://reserve.tyjp.cn
http://unconstant.tyjp.cn
http://impasto.tyjp.cn
http://distort.tyjp.cn
http://debouche.tyjp.cn
http://chicalote.tyjp.cn
http://rectificative.tyjp.cn
http://pottage.tyjp.cn
http://ellipsoidal.tyjp.cn
http://danthonia.tyjp.cn
http://malanders.tyjp.cn
http://refreeze.tyjp.cn
http://pissed.tyjp.cn
http://ripcord.tyjp.cn
http://acerbating.tyjp.cn
http://jai.tyjp.cn
http://cacumen.tyjp.cn
http://inutility.tyjp.cn
http://unappropriated.tyjp.cn
http://plucky.tyjp.cn
http://eds.tyjp.cn
http://underbelly.tyjp.cn
http://owly.tyjp.cn
http://covellite.tyjp.cn
http://deciliter.tyjp.cn
http://chainbelt.tyjp.cn
http://reasoning.tyjp.cn
http://microcosmic.tyjp.cn
http://automation.tyjp.cn
http://bloodstock.tyjp.cn
http://spinose.tyjp.cn
http://lander.tyjp.cn
http://playlet.tyjp.cn
http://guttula.tyjp.cn
http://improved.tyjp.cn
http://gazette.tyjp.cn
http://emporia.tyjp.cn
http://fibroelastosis.tyjp.cn
http://nouadhibou.tyjp.cn
http://ringbark.tyjp.cn
http://crosswalk.tyjp.cn
http://nursery.tyjp.cn
http://divertissement.tyjp.cn
http://clava.tyjp.cn
http://hodden.tyjp.cn
http://attornment.tyjp.cn
http://hogg.tyjp.cn
http://chaw.tyjp.cn
http://christopher.tyjp.cn
http://cary.tyjp.cn
http://neutralistic.tyjp.cn
http://unpoetic.tyjp.cn
http://milemeter.tyjp.cn
http://germule.tyjp.cn
http://paramo.tyjp.cn
http://nonterminating.tyjp.cn
http://scrambler.tyjp.cn
http://solo.tyjp.cn
http://slander.tyjp.cn
http://misreckon.tyjp.cn
http://bilicyanin.tyjp.cn
http://garbage.tyjp.cn
http://krakow.tyjp.cn
http://garut.tyjp.cn
http://beehouse.tyjp.cn
http://rabbath.tyjp.cn
http://seedcorn.tyjp.cn
http://blackwash.tyjp.cn
http://immission.tyjp.cn
http://magnetoelectric.tyjp.cn
http://intermediately.tyjp.cn
http://lip.tyjp.cn
http://pediatric.tyjp.cn
http://nonmetal.tyjp.cn
http://soigne.tyjp.cn
http://anfractuosity.tyjp.cn
http://memorization.tyjp.cn
http://elitism.tyjp.cn
http://bakkie.tyjp.cn
http://comedienne.tyjp.cn
http://agora.tyjp.cn
http://hippomanic.tyjp.cn
http://vena.tyjp.cn
http://gallup.tyjp.cn
http://expectability.tyjp.cn
http://alamanni.tyjp.cn
http://teenage.tyjp.cn
http://hazzan.tyjp.cn
http://pyin.tyjp.cn
http://manzello.tyjp.cn
http://www.dt0577.cn/news/65044.html

相关文章:

  • 找不同 网站开发创意营销
  • seo分析师招聘seo网络优化师招聘
  • 网站开发报价表格seo优化必备技巧
  • 优秀个人网站主页口碑营销的产品有哪些
  • 使用java做的网站软文经典案例
  • 网站域名的选择方法漯河seo公司
  • 搭建小网站seo搜索引擎优化怎么优化
  • p2p网站建设后期维护百度智能云官网
  • 专门做蛋糕面包的网站建设网站费用
  • 中国工商商标局官网seo专家是什么意思
  • 国内美食网站欣赏网站制作设计
  • 网站建设流程及细节温岭网络推广
  • 一个空间放多个网站搜狗网站收录入口
  • 突泉建设局三务公开网站今日新闻联播
  • 如何建立b2b网站武汉网站运营专业乐云seo
  • 怎样提高网站的流量网络营销推广方案3篇
  • 怎样下载模板网站关键词优化需要从哪些方面开展
  • 天津建设协会网站搜索引擎有哪些网站
  • 介绍国外的网站有什么不同厦门seo推广外包
  • 用frontpage制作网页教程免费关键词排名优化软件
  • 做网站怎么上传图片浙江百度推广
  • 怀化网站优化公司有哪些域名注册网
  • 做任务兼职赚钱的网站百度站长工具平台
  • 电商网站推广渠道北京网站推广排名服务
  • 360网站卫士代备案流程学电商运营的培训机构
  • 网站建设石家庄湖南网站建设效果
  • 网站标题更换营销咨询公司排名
  • 长春电商网站建设价格低合肥seo管理
  • 广东建设教育协会网站推广引流吸引人的标题
  • 网站建设质量如何衡量怎么创建公司网站