我是靠谱客的博主 兴奋菠萝,这篇文章主要介绍spring 基于 xml 配置的快速入门(超详细),现在分享给大家,希望可以做个参考。

Spring的出现是为了解决企业应用程序开发的复杂性 它是一个分层的、JavaSE/EE一站式、轻量级开源框架。

Spring框架是一个分层架构,它包含一系列的功能要素并被分为大约20个模块。这些模块分为Core Container、Data Access/Integration、Web、AOP(Aspect Oriented Programming)、Instrumentation和测试部分。

spring的两个核心是 ioc 和 aop;
IoC(Inversion of Control 控制反转):将对象创建的权利交给spring工厂来控制。
AOP(Aspect Oriented Programming 面向切面编程),基于动态代理的功能增强方式。

本章主要学习下ioc的内容;

第一步 : 创建工程导入jar 包。

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.example</groupId>
    <artifactId>springTest</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>5.0.5.RELEASE</version>
        </dependency>
        <d

最后

以上就是兴奋菠萝最近收集整理的关于spring 基于 xml 配置的快速入门(超详细)的全部内容,更多相关spring内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(52)

评论列表共有 0 条评论

立即
投稿
返回
顶部