eclipse安装Spring的具体步骤
1、下载spring 官网下载需要jar包放在lib中
本人分享百度云jar
链接:https://pan.baidu.com/s/1iEMwBbTTCxuCNOEdprlGhg
提取码:e7tg
2、 配置applicationContext.xml

配置代码xml
<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="Student" class="entity.Student">
<property name="name">
<value>tom</value>
</property>
</bean>
</beans>
3、新建两个文件

Student.java
package entity;
public class Student {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
DemoTest.java
package entity; import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext; public class DemoTest { public static void main(String arg[]) {
ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml"); // 实例化Spring容器
Student stu = (Student) ctx.getBean("Student");
System.out.println("name:" + stu.getName());
System.out.println("test main");
}
}
eclipse安装Spring的具体步骤的更多相关文章
- eclipse安装spring boot插件spring tool suite
进行spring cloud的学习,要安装spring boot 的spring -tool-suite插件,我在第一次安装时,由于操作不当,两天才完全安装好,真的是要命了,感觉自己蠢死!下面就自己踩 ...
- eclipse安装spring tool suite插件
在实际项目开发时,如果我们创建了一个spring文件,其实也就是个xml文件,如果没有集成spring的开发工具,创建的就是一个单纯的xml文件.安装spring插件以后创建spring配置文件会方便 ...
- Eclipse安装Spring工具套件
前言: 安装spring工具套件是为了更快捷的使用spring,但是我觉得既然已经有了maven,工具套件其实不那么重要. 而且装好后我发觉没什么两样,只是新建bean文件时比较爽一点. 安装步骤: ...
- eclipse 安装 spring boot suite 插件遇到的问题
问题:安装失败,报如下错误: An error occurred while collecting items to be installedsession context was:(profile= ...
- Eclipse 安装spring插件spring tool suite(STS)
安装方法有2种,一种是在线安装,比较方便,但耗时较长,一种是离线安装,步骤复杂一些,但耗时少,下面请看详细步骤. 方法一:在线安装 1:打开eclipse菜单Help>Eclise Ma ...
- eclipse安装spring插件
1.打开eclipse点击help,点击about eclipse 2.点击最左侧图票查看eclipse版本 3.查看版本 4.进入http://spring.io/tools/sts/all,选择适 ...
- eclipse安装Spring Tool Suite 各个版本的方法
有时候spring官网上找不到与我们当前eclipse对应的spring插件,用URL的方式安装费时又费力,那么如何下载对应的spring插件呢? 先到插件页面,然后点击“原先的插件版本” 显示出这个 ...
- Eclipse安装Spring Tools Suites
第一种:离线安装 下载地址:较高版本 http://spring.io/tools/sts/all/ 比较低版本:http://spring.io/tools/ggts/all 选择适合自己Eclip ...
- eclipse 安装spring tools suite插件
之前使用idea进行springboot项目的开发学习,但是由于idea是收费的,总是用着用着说验证码到期之类的,总之还是很不爽,于是就想重新采用eclipse开发springboot项目,为了方便s ...
随机推荐
- Hdoj 1517.A Multiplication Game 题解
Problem Description Stan and Ollie play the game of multiplication by multiplying an integer p by on ...
- 自定义一个IOC框架
要实现的功能: 将对象的实例化交给自定的ioc容器. 通过注解的方式对接口进行依赖注入 通过getBean("userName")方法那到对象,使用对象的方法 首先,创建一个对象, ...
- Codeforces 1077F2 Pictures with Kittens (hard version)(DP+单调队列优化)
题目链接:Pictures with Kittens (hard version) 题意:给定n长度的数字序列ai,求从中选出x个满足任意k长度区间都至少有一个被选到的最大和. 题解:数据量5000, ...
- 监控MySQL|Redis|MongoDB的执行语句(go-sniffer)
上节回顾:https://www.cnblogs.com/dotnetcrazy/p/9986873.html 以CentOS为例: 1.环境 PS:如果不需要Golang环境,可以编译后把执行文件c ...
- idea设置java内存
-Xms1024m -Xmx10240m -XX:MaxPermSize=512m 设置环境变量JAVA_OPTS="-server -Xms800m -Xmx800m -XX:PermSi ...
- deepin 下安装goland中文字体显示全是方块
下载中文字体 apt-get install ttf-arphic-uming xfonts-intl-chinese 替换goland的汉化包,两个jar包.https://blog.csdn.ne ...
- 第十五节: EF的CodeFirst模式通过DataAnnotations修改默认协定
一. 简介 1. DataAnnotations说明:EF提供以特性的方式添加到 domain classes上,其中包括两类: A:System.ComponentModel.DataAnnota ...
- 学习python笔记 协程
下面将一个经典的消费者和生产者的案例进行分析: import time def consumer(): r = '' while True: n = yield r if not n: return ...
- centos7.2 环境下 mysql-5.1.73 安装配置
安装mysql,安装前准备 如果mysql用户不存在,那么添加mysql用户 groupadd mysql useradd -g mysql mysql mysql编译安装 tar -zxvf mys ...
- 嵌套调用less函数时参数值的变化及提取部分-遁地龙卷风
在a.less中导入base.lessa.less中的代码 .animate-ripple-ink{ .animation(ripple .5s linear;{ 100%{ opacity:; .t ...