What is Spring

    Spring is a framework that help software developers to build a better enterprise.It has two primary features which are dependency injection(DI) and aspect-oriented programming.In a word,at the root of almost everything Spring provides are a few  foundational ideas,all foucused on Spring's fundamental mission: Spring simplifies Java development.
   For example,When I want to eat an apple.What should I do?I think I should go to the supermarket(what I means was that I have the responsibility to care about what I really need,where I should to find them.Oh my god,there are so many things to do).So the grogram is just like this:
   
public class Person{
      Food favoriteFood;
       public Person(){
            favoriteFood =new Apple();
      }
      public void eat(){
             System.out.println(favoriteFood.name);
      }
}
OK,Now I can eat my favorite Food.But there is a problem.One day I find I don't like apple any more,maybe I like  Banana.So what should I do?Change my program?I can't belive that I only want to eat Banana,you tell my to change my program?
    Why can't our program be flexible、maintainable,Scalable?Because We use the key word "new",this word tell our program there is no change forever,just use it.But how to simplify Java development?
     To beck up its attack on Java complexity,Spring employs four key strategies:
     1、Lightweight and minimally invasive development with POJOs.
     2、Loose coupling through DI and interface orientation.
     3、Declarative programming through aspects and common conventions.
     4、Eliminating boilerplate code with aspects and templates.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 30
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 30
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值