spring 是一个开源的框架 也是轻量级框架

1、导入jar包 spring的版本 4.0

目录: spring-framework-4.0.0.RELEASE-libs 下的jar  spring最基本的jar

2、spring必须依赖的日志jar

3、写一个配置文件applicationContext.xml  如下

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

<bean id="helloWorld" class="com.atguigu.spring.helloworld.HelloWorld" >

<property name="userName" value="spring"></property>
</bean>

</beans>

4、hellowworld的java类

5、main方法

spring的第一个helloworld的程序写完了

如果不用 spring 创建对象

HelloWorld hello = new HelloWorld();

赋值

hello.setName("spring");

第一个spring简单的helloworld的更多相关文章

  1. 利用maven构建一个spring mvc的helloworld实例

    刚开始学习maven和spring mvc,学的云里雾里的 这里提供一个hello world实例,记录自己的学习之路 首先看maven官网的介绍 Apache Maven is a software ...

  2. 第一个Spring程序HelloWorld

    对于初学者而言,任何理论化的讲解都比不上一个简单的HelloWorld,我们在学习Spring时也不外乎用最简单的HelloWorld程序来将这个灵活而又强大的轻量级框架推送到诸位面前.想要说明的是现 ...

  3. Spring Boot 最简单的HelloWorld

    创建一个Spring Boot,可以直接使用构建工具(Maven或Gradle)创建,也可以使用spring.io网站创建,一般会选择使用spring.io创建 使用IDEA创建一个Spring Bo ...

  4. Spring Boot2(002):手动创建第1个SpringBoot2简单应用——“HelloWorld” web 工程

    备注:以下内容参考 springboot 官方文档 https://docs.spring.io/spring-boot/docs/2.1.5.RELEASE/reference/pdf/spring ...

  5. 创建一个spring helloworld

    1.下载所需要的jar包 http://projects.spring.io/spring-framework/ 这里使用了maven方式给出jar <dependencies> < ...

  6. Mybatis_1(认识)一个简单的HelloWorld

    1. 介绍: MyBatis是支持普通SQL查询,存储过程和高级映射的优秀持久层框架. MyBatis消除了几乎所有的JDBC代码和参数的手工设置以及对结果集的检索. MyBatis可以使用简单的XM ...

  7. Spring学习之路——简单入门HelloWorld

    Spring简单介绍 Spring是一个提供了解决J2EE问题的一站式框架. Spring的核心是反转控制,通过配置文件完成业务对象之间的依赖注入,他鼓励一个良好的习惯,就是注入对接口编程而不是对类编 ...

  8. Android的NDK开发(2)————利用Android NDK编写一个简单的HelloWorld

    1.Android NDK简介 NDK全称为native development kit本地语言(C&C++)开发包.而对应的是经常接触的Android-SDK,(software devel ...

  9. 手写一个最简单的IOC容器,从而了解spring的核心原理

    从事开发工作多年,spring源码没有特意去看过.但是相关技术原理倒是背了不少,毕竟面试的那关还是得过啊! 正所谓面试造火箭,工作拧螺丝.下面实现一个最简单的ioc容器,供大家参考. 1.最终结果 2 ...

随机推荐

  1. ES6-map、filter、find、findIndex讲解

    map方法:可以简单的理解为映射 var arr=[1,2,3,4]; console.log( arr.map((n)=>n*n) );//[1, 4, 9, 16] console.log( ...

  2. Heroku 教程

    中文 https://www.jianshu.com/p/7bc34e56fa39 http://www.bjhee.com/flask-heroku.html 官方 Getting Started ...

  3. 检查 TCP 80 端口是否正常工作

    检查 TCP 80 端口是否正常工作 2017-09-13 22:12:50 目录 Windows Server 2012 Windows Server 2008 CentOS 7.3 Ubuntu ...

  4. Cesium学习网址

    不错的案例介绍: 根据地形瓦片直接绘制高程.坡度及等高线 同一场景下显示两个不同的瓦片图层 https://cloud.tencent.com/developer/article/1113355 绘制 ...

  5. WPF DEV gridcontrol 自定义计算列(TotalSummary)

    /// <summary> /// 自定义计算列 /// </summary> /// <param name="sender"></pa ...

  6. 从零开始学习python:demo2.3

    字符串拼接+: first="hello" #将hello赋值给变量firstsecond="world" #将world赋值给变量secondfull=fir ...

  7. vue中提交表单后如何清空

    只需要在提交方法里写上this.form={brand_right:0}即可.

  8. python之psutil

    psutil = process and system utilities, psutil是个跨平台库,能够轻松实现获取系统运行的进程和系统利用率,包括CPU.内存.磁盘.网络等信息. Linux系统 ...

  9. java8-函数编程

    在Function里面看到一个很奇怪的代码 static <T> Function<T, T> identity() { return t -> t; } 手动写了几个代 ...

  10. !!!常用CSS代码

    http://www.cnblogs.com/qq21270/p/4854643.html 伪类 http://www.cnblogs.com/qq21270/p/4891167.html CSS3动 ...