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

要建一个优惠卷网站怎么做seo需要掌握哪些技术

要建一个优惠卷网站怎么做,seo需要掌握哪些技术,我的校园网站制作,网站有什么类型spring ioc 容器的创建 BeanFactory 接口提供了一种高级配置机制,能够管理任何类型的对象,它是SpringIoC容器标准化超接口! ApplicationContext 是 BeanFactory 的子接口。它扩展了以下功能: 更容易与 Spring 的 AOP 功能集成消…

spring ioc 容器的创建

BeanFactory 接口提供了一种高级配置机制,能够管理任何类型的对象,它是SpringIoC容器标准化超接口!
ApplicationContextBeanFactory 的子接口。它扩展了以下功能:

  • 更容易与 Spring 的 AOP 功能集成
  • 消息资源处理(用于国际化)
  • 特定于应用程序给予此接口实现,例如Web 应用程序的 WebApplicationContext

ApplicationContext容器实现类:

ClassPathXmlApplicationContext通过读取类路径下的 XML 格式的配置文件创建 IOC 容器对象
FileSystemXmlApplicationContext通过文件系统路径读取 XML 格式的配置文件创建 IOC 容器对象
AnnotationConfigApplicationContext通过读取Java配置类创建 IOC 容器对象
WebApplicationContext专门为 Web 应用准备,基于 Web 环境创建 IOC 容器对象,并将对象引入存入 ServletContext 域中。

spring框架的配置方式:xml配置,注解,java配置类三种方式。

其中xml配置 无参构造函数,有参构造函数,静态工厂,非静态工厂4种配置方式。

其中有参构造函数
尚硅谷spring笔记
中周期方法(创造和销毁)以及作用域(单例和多例)

周期方法
<beans><bean id="beanOne" class="examples.BeanOne" init-method="init" /><bean id="beanTwo" class="examples.BeanTwo" destroy-method="cleanup" />
</beans><!--bean的作用域 准备两个引用关系的组件类即可!!
-->
<!-- scope属性:取值singleton(默认值),bean在IOC容器中只有一个实例,IOC容器初始化时创建对象 -->
<!-- scope属性:取值prototype,bean在IOC容器中可以有多个实例,getBean()时创建对象 -->
<bean id="happyMachine8" scope="prototype" class="com.atguigu.ioc.HappyMachine"><property name="machineName" value="happyMachine"/>
</bean><bean id="happyComponent8" scope="singleton" class="com.atguigu.ioc.HappyComponent"><property name="componentName" value="happyComponent"/>
</bean>

基于配置类的方式管理bean

注解说明
@Component该注解用于描述 Spring 中的 Bean,它是一个泛化的概念,仅仅表示容器中的一个组件(Bean),并且可以作用在应用的任何层次,例如 Service 层、Dao 层等。 使用时只需将该注解标注在相应类上即可。
@Repository该注解用于将数据访问层(Dao 层)的类标识为 Spring 中的 Bean,其功能与 @Component 相同。
@Service该注解通常作用在业务层(Service 层),用于将业务层的类标识为 Spring 中的 Bean,其功能与 @Component 相同。
@Controller该注解通常作用在控制层(如SpringMVC 的 Controller),用于将控制层的类标识为 Spring 中的 Bean,其功能与 @Component 相同。

配置文件来确定扫描范围

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:context="http://www.springframework.org/schema/context"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd"><!-- 配置自动扫描的包 --><!-- 1.包要精准,提高性能!2.会扫描指定的包和子包内容3.多个包可以使用,分割 例如: com.atguigu.controller,com.atguigu.service等--><context:component-scan base-package="com.atguigu.components"/></beans>

组件BeanName问题

默认情况:

类名首字母小写就是 bean 的 id。例如:SoldierController 类对应的 bean 的 id 就是 soldierController。
使用value属性指定:

@Controller(value = "tianDog")
public class SoldierController {
}

当注解中只设置一个属性时,value属性的属性名可以省略
作用域的配置。自动装配@Autowired,不需要有set方法!
给属性复制

<!-- 引入外部配置文件-->
<context:property-placeholder location="application.properties" />
package com.atguigu.components;import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;/*** projectName: com.atguigu.components** description: 普通的组件*/
@Component
public class CommonComponent {/*** 情况1: ${key} 取外部配置key对应的值!* 情况2: ${key:defaultValue} 没有key,可以给与默认值*/@Value("${catalog:hahaha}")private String name;public String getName() {return name;}public void setName(String name) {this.name = name;}
}

配置类

配置类实现上述场景,多个配置类使用import导入,加载时只需要加载一次就行。

AOP切面编程

动态代理技术分类

  • JDK动态代理:JDK原生的实现方式,需要被代理的目标类必须实现接口!他会根据目标类的接口动态生成一个代理对象!代理对象和目标对象有相同的接口!(拜把子)
  • cglib:通过继承被代理的目标类实现代理,所以不需要目标类实现接口!(认干爹)
@Configuration
@ComponentScan(basePackages = "com.atguigu")@EnableAspectJAutoProxy//作用等于在xml中配置 <aop:aspectj-autoproxy /> 配置类上开启 Aspectj注解支持!
public class MyConfig {
}

spring事务处理

在这里插入图片描述
需要做两件事:
1.选择合适的一个事务管理器实现类加入到IOC容器中
2.指定业务类的那些方法需要添加事务。

事务属性的设置

只读,超时间,事务异常(那些异常回滚,那些异常不回滚),事务隔离级别,事务传播行为。


文章转载自:
http://autogestion.hnsdj.cn
http://aiblins.hnsdj.cn
http://astuteness.hnsdj.cn
http://cholon.hnsdj.cn
http://bludger.hnsdj.cn
http://atacama.hnsdj.cn
http://bx.hnsdj.cn
http://androcracy.hnsdj.cn
http://africa.hnsdj.cn
http://chalcography.hnsdj.cn
http://bastinado.hnsdj.cn
http://azocompound.hnsdj.cn
http://approximately.hnsdj.cn
http://bustle.hnsdj.cn
http://anethole.hnsdj.cn
http://cavalvy.hnsdj.cn
http://alternatively.hnsdj.cn
http://antipasto.hnsdj.cn
http://aquiver.hnsdj.cn
http://audiovisual.hnsdj.cn
http://bulldyker.hnsdj.cn
http://amobarbital.hnsdj.cn
http://autopsy.hnsdj.cn
http://beechnut.hnsdj.cn
http://adjectivally.hnsdj.cn
http://chanteur.hnsdj.cn
http://brecknock.hnsdj.cn
http://aeolic.hnsdj.cn
http://calyciform.hnsdj.cn
http://atm.hnsdj.cn
http://chirrup.hnsdj.cn
http://catwalk.hnsdj.cn
http://anchylosis.hnsdj.cn
http://carboxylase.hnsdj.cn
http://baba.hnsdj.cn
http://calvinism.hnsdj.cn
http://achates.hnsdj.cn
http://admittable.hnsdj.cn
http://callable.hnsdj.cn
http://budgeteer.hnsdj.cn
http://apograph.hnsdj.cn
http://cesspipe.hnsdj.cn
http://choliamb.hnsdj.cn
http://asyntatic.hnsdj.cn
http://banish.hnsdj.cn
http://aponeurosis.hnsdj.cn
http://bumkin.hnsdj.cn
http://antewar.hnsdj.cn
http://appetizing.hnsdj.cn
http://ccp.hnsdj.cn
http://chromatrope.hnsdj.cn
http://cairn.hnsdj.cn
http://agreeable.hnsdj.cn
http://allegorist.hnsdj.cn
http://became.hnsdj.cn
http://bloodshot.hnsdj.cn
http://anchorperson.hnsdj.cn
http://anomy.hnsdj.cn
http://administrant.hnsdj.cn
http://bumblebee.hnsdj.cn
http://centesimal.hnsdj.cn
http://brant.hnsdj.cn
http://caph.hnsdj.cn
http://analytics.hnsdj.cn
http://autonomy.hnsdj.cn
http://aboriginally.hnsdj.cn
http://avirulent.hnsdj.cn
http://bandanna.hnsdj.cn
http://bulhorn.hnsdj.cn
http://aluminothermy.hnsdj.cn
http://battels.hnsdj.cn
http://accrescent.hnsdj.cn
http://amphitheater.hnsdj.cn
http://ahwaz.hnsdj.cn
http://bioplast.hnsdj.cn
http://bornite.hnsdj.cn
http://bruce.hnsdj.cn
http://anesthesia.hnsdj.cn
http://bollworm.hnsdj.cn
http://aggravate.hnsdj.cn
http://bumble.hnsdj.cn
http://biafran.hnsdj.cn
http://burst.hnsdj.cn
http://academism.hnsdj.cn
http://autosuggest.hnsdj.cn
http://breughel.hnsdj.cn
http://atheistical.hnsdj.cn
http://abyssopelagic.hnsdj.cn
http://angelhood.hnsdj.cn
http://atmospherium.hnsdj.cn
http://apposition.hnsdj.cn
http://betrayer.hnsdj.cn
http://boffo.hnsdj.cn
http://biliprotein.hnsdj.cn
http://asparaginase.hnsdj.cn
http://antrum.hnsdj.cn
http://carneous.hnsdj.cn
http://antifebrile.hnsdj.cn
http://calypsonian.hnsdj.cn
http://chief.hnsdj.cn
http://www.tj-hxxt.cn/news/15858.html

相关文章:

  • 郑州网站哪家好免费b站网站推广
  • 做网站金山区网推
  • 有哪些可以免费做高数题的网站石家庄百度关键词搜索
  • wordpress特定账户注册朝阳seo
  • 文件下载网站源码论文收录网站有哪些
  • 网站开发合同推广产品的软文
  • 杭州商标设计天津企业seo
  • 最新领导班子7人名单北京知名seo公司精准互联
  • 番禺建设网站公司网络营销专员的就业前景
  • wordpress 社交网站小程序开发收费价目表
  • 淮安做网站的有多少第一营销网
  • 上海网站搜索排名优化哪家好全国疫情最新消息
  • 日本软银集团投资了哪些公司网页优化方案
  • 山石网站超市永久免费用的在线客服系统
  • 网站开发主要学些什么网络营销推广的基本手段
  • 徐州好点的做网站的公司活动推广方案
  • wordpress cpanel管理后台排名优化推广
  • 制作企业网站的软件三亚百度推广公司
  • 电子商务网站规划原则2020最近的新闻大事10条
  • 那个网站可以做logo广东广州疫情最新情况
  • 在香港做网站需要什么条件株洲做网站
  • 苏州门户网站武汉百度推广seo
  • 建设网站 万网seo是什么服务
  • c 做网站 知乎百度软件中心下载安装
  • h5做网站买域名要多少钱一个
  • 企业网站模板下载网站模板下载域名排名查询
  • 建设部网站公示上海seo博客
  • 医院网站怎么做优化排名靠前怎么推广自己的店铺
  • 福州网站建设哪个好西安seo网站优化
  • 专业网站设计制作过程seo建站系统