Spring rebooted --重新认识Spring

Are you wondering why you are forced to read so many books? Just remember one sentence: Read a lot and make trip further. you can benefit a lot from books.
想知道为什么要读那么多书吗?请记住一句话:读万卷书,行万里路。你会从书中获益良多。

Spring started as a lightweight alternative to Java Enterprise Edition (JEE, or J2EE as it was known at the time).
Spring诞生时是Java企业版(Java Enterprise Edition,JEE,也称J2EE)的轻量级代替品。

Rather than develop components as heavyweight Enterprise JavaBeans (EJBs), Spring offered a simpler approach to enterprise Java development, utilizing dependency injection and aspect-oriented programming to achieve the capa- bilities of EJB with plain old Java objects (POJOs).
无需 开发重量级的Enterprise JavaBean(EJB),Spring提供了更简单的企业级开发,利用依赖注入和切面编程,用简单的Java对象POJO实现EJB的功能

But while Spring was lightweight in terms of component code, it was heavyweight in terms of configuration.
但Spring在开发组件的时候很轻量级,但在配置方面很重

Initially, Spring was configured with XML (and lots of it).
一开始的时候,Spring是使用XML进行配置的,而且很多XML配置

Spring 2.5 introduced annotation-based component-scanning, which eliminated a great deal of explicit XML configuration for an application’s own components.
Spring 2.5引入了基于注解的组件扫描,这消除了大量针对应用程序自身组件的显式XML配置。

And Spring 3.0 introduced a Java-based configuration as a type-safe and refactorable option to XML.
Spring 3.0引入了基于Java的配置,这是一种类型安全的可重构配置方式, 可以代替XML。

Even so, there was no escape from configuration.
尽管如此,我们依旧没能逃脱配置的魔爪。

Enabling certain Spring features such as transaction management and Spring MVC required explicit configuration, either in XML or Java.
开启某些Spring特性时,比如事务管理和Spring MVC,还是需要用XML或Java进行显式配置。

Enabling third-party library features such as Thymeleaf-based web views required explicit configuration.
启用第三方库时也需要显式配置,比如基于 Thymeleaf的Web视图。

Configuring servlets and filters (such as Spring’s DispatcherServlet) required explicit configuration in web.xml or in a servlet initializer.
配置Servlet 和 过滤器(比如Spring的DispatcherServlet)同样需要在 web.xml或Servlet初始化代码里进行显式配置。

Component-scanning reduced configuration and Java configuration made it less awkward, but Spring still required a lot of configuration.
配置扫描减少配置量, Java配置让它看上去简洁 不少,但Spring还是需要不少配置。

All of that configuration represents development friction.
这些配置都代表了开发时的损耗。

Any time spent writing configuration is time spent not writing application logic. The mental shift required to think about configuring a Spring feature distracts from solving the business problem.
因为在思考Spring特性配置和解决业务问题之间需要 进行思维切换,所以写配置挤占了写应用程序逻辑的时间。

Like any framework, Spring does a lot for you, but it demands that you do a lot for it in return.
和所有框架一样,Spring实用,但与 此同时它要求的回报也不少。

Moreover, project dependency management is a thankless task.
除此之外,项目的依赖管理也是件吃力不讨好的事情。

Deciding what libraries need to be part of the project build is tricky enough. But it’s even more challenging to know which versions of those libraries will play well with others
决定项目里要用哪些库就已经够让人 头痛的了,你还要知道这些库的哪个版本和其他库不会有冲突,这难题实在太棘手。

As important as it is, dependency management is another form of friction.
并且,依赖管理也是一种损耗,添加依赖不是写应用程序代码。

When you’re adding dependencies to your build, you’re not writing application code. Any incompatibilities that come from selecting the wrong versions of those dependencies can be a real productivity killer.
一旦选错了依赖的版本,随 之而来的不兼容问题毫无疑问会是生产力杀手。
Spring Boot让这一切成为了过去。

Spring Boot has changed all of that.
Spring Boot 将改变这一切

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
牙科就诊管理系统利用当下成熟完善的SSM框架,使用跨平台的可开发大型商业网站的Java语言,以及最受欢迎的RDBMS应用软件之一的Mysql数据库进行程序开发。实现了用户在线查看数据。管理员管理病例管理、字典管理、公告管理、药单管理、药品管理、药品收藏管理、药品评价管理、药品订单管理、牙医管理、牙医收藏管理、牙医评价管理、牙医挂号管理、用户管理、管理员管理等功能。牙科就诊管理系统的开发根据操作人员需要设计的界面简洁美观,在功能模块布局上跟同类型网站保持一致,程序在实现基本要求功能时,也为数据信息面临的安全问题提供了一些实用的解决方案。可以说该程序在帮助管理者高效率地处理工作事务的同时,也实现了数据信息的整体化,规范化与自动化。 管理员在后台主要管理病例管理、字典管理、公告管理、药单管理、药品管理、药品收藏管理、药品评价管理、药品订单管理、牙医管理、牙医收藏管理、牙医评价管理、牙医挂号管理、用户管理、管理员管理等。 牙医列表页面,此页面提供给管理员的功能有:查看牙医、新增牙医、修改牙医、删除牙医等。公告信息管理页面提供的功能操作有:新增公告,修改公告,删除公告操作。公告类型管理页面显示所有公告类型,在此页面既可以让管理员添加新的公告信息类型,也能对已有的公告类型信息执行编辑更新,失效的公告类型信息也能让管理员快速删除。药品管理页面,此页面提供给管理员的功能有:新增药品,修改药品,删除药品。药品类型管理页面,此页面提供给管理员的功能有:新增药品类型,修改药品类型,删除药品类型。
/** * Perform the specified type of NV config reset. The radio will be taken offline * and the device must be rebooted after the operation. Used for device * configuration by some CDMA operators. * * <p>Requires Permission: * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling * app has carrier privileges (see {@link #hasCarrierPrivileges}). * * TODO: remove this one. use {@link #rebootRadio()} for reset type 1 and * {@link #resetRadioConfig()} for reset type 3 * * @param resetType reset type: 1: reload NV reset, 2: erase NV reset, 3: factory NV reset * @return true on success; false on any failure. * * @hide */ @UnsupportedAppUsage public boolean nvResetConfig(int resetType) { try { ITelephony telephony = getITelephony(); if (telephony != null) { if (resetType == 1 /*1: reload NV reset */) { return telephony.rebootModem(getSlotIndex()); } else if (resetType == 3 /3: factory NV reset /) { return telephony.resetModemConfig(getSlotIndex()); } else { Rlog.e(TAG, "nvResetConfig unsupported reset type"); } } } catch (RemoteException ex) { Rlog.e(TAG, "nvResetConfig RemoteException", ex); } catch (NullPointerException ex) { Rlog.e(TAG, "nvResetConfig NPE", ex); } return false; } / * Rollback modem configurations to factory default except some config which are in whitelist. * Used for device configuration by some carriers. * * <p>Requires Permission: * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling * app has carrier privileges (see {@link #hasCarrierPrivileges}). * * @return {@code true} on success; {@code false} on any failure. * * @hide */ @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE) @SystemApi public boolean resetRadioConfig() { try { ITelephony telephony = getITelephony(); if (telephony != null) { return telephony.resetModemConfig(getSlotIndex()); } } catch (RemoteException ex) { Rlog.e(TAG, "resetRadioConfig RemoteException", ex); } catch (NullPointerException ex) { Rlog.e(TAG, "resetRadioConfig NPE", ex); } return false; }这两个接口是否可以恢复相关的网络
07-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值