android tools属性引用

利用tools命名空间,android studio支持很多XML属性,当构建app时这些属性会被擦除,对APK的大小和运行时行为没有任何影响。请看官网

tools属性大致可以分为三类:1,错误处理属性,这样就会影响到Lint的提示;2,资源shrink属性,影响到资源以何种方式shrink;3,布局编辑器设计时View属性。

1 错误处理属性

  • tools:ignore

任何元素都可以使用这个属性,比如strings.xml里面的string元素,我们可以忽略掉MissingTranslation这个错误属性:

<string name="show_all_apps" tools:ignore="MissingTranslation">All</string>

再比如对于下面代码中的ImageView元素,如果我们没有添加tools:ignore这个属性,那么Lint会提示该ImageView缺少android:contentDescription属性,tools:ignore="contentDescription"可以忽略这个警告:

<ImageView
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:src="@drawable/divider"
  tools:ignore="contentDescription" />
  • tools:targetApi

任何元素都可以使用这个属性,它和java代码中的注解@TargetApi是一样的:它指定了当前元素支持API级别,属性值既可以是数字也可以是代码名字。
这样的话,即使指定的minSdkVersion不支持当前元素,那么Lint也不会警告。比如设置的minSdkVersion=12,但是要使用GridLayout的话,就必须加上tools:targetApi="14"

<GridLayout android:layout_width="match_parent"
              android:layout_height="match_parent"
              tools:targetApi="ice_cream_sandwich"/>
  • tools:locale

只有resources标签才能使用这个属性。resources默认的语言和区域是英语,会进行拼写检查,而这个属性过指定了resources的语言和区域,当然属性值必须是合法的locale qualifier

比如你可以指定values/strings.xml文件的默认语言是西班牙语而不是英语:

<resources xmlns:tools="http://schemas.android.com/tools"    tools:locale="es">

2 资源压缩模式

当使用resource shrinking的时候下面的属性指定资源压缩的一些特性。

为了使用资源压缩,请将build.gradle文件的shrinkResources 属性置为true,(minifyEnabled属性是code shrinking代码压缩):

android {
    ...    
    buildTypes {        
        release {            
            shrinkResources true            
            minifyEnabled true            
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        
        }    
    }
}
  • tools:shrinkMode

适用对象:<resources>。指定构建的时候是使用safe mode还是strict mode。safe mode保留所有直接引用的资源和可能动态使用的资源,比如Resources.getIdentifier()方式调用的资源。strict mode只保留直接引用的资源。

默认的安全模式是shrinkMode="safe"。如果要使用strict mode,可以用下面的代码:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
    tools:shrinkMode="strict" />

如果启用了strict mode,可以自定义要保留的资源,如果想要保留或舍弃的特定资源,在您的项目中创建一个包含 <resources> 标记的 XML 文件,并在 tools:keep 属性中指定每个要保留的资源,在tools:discard属性中指定每个要舍弃的资源。这两个属性都接受逗号分隔的资源名称列表。您可以使用星号字符作为通配符。例如:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
    tools:keep="@layout/l_used*_c,@layout/l_used_a,@layout/l_used_b*"
    tools:discard="@layout/unused2" />

将该文件保存在项目资源中,例如,保存在 res/raw/keep.xml。构建不会将该文件打包到 APK 之中。
更多信息请查看:Shrink your resources

  • tools:keep

适用对象:<resources>标签。这个属性能够保留特定的资源,比如Resources.getIdentifier())动态使用的资源。用法是可以创建res/raw/keep.xml文件,内容如下:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"    
    tools:keep="@layout/used_1,@layout/used_2,@layout/*_3" />
  • tools:discard

适用对象:<resources>标签。有些资源可能被引用但是又对app没有影响,不能直接删除这些资源,那么这个属性可以移除这些资源;或者Gradle插件错误地推断这些资源是被引用的,那么也可以使用这个属性。用法如下:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
    tools:discard="@layout/unused_1" />

3 布局编辑器设计时View属性

  • tools:替换android:

tools可以覆盖所有的android属性,相信这个是大家用过的最多的,就不说了。

  • tools:parentTag

android studio2.2新加了这个属性可以指定merge标签的布局类型,比如:

<merge xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:parentTag="android.widget.LinearLayout">
</merge>
  • tools:context

只有根View才能使用这个属性,它指定了当前布局默认是跟哪个Activity相关联,使得布局获取那个Activity的一些信息比如Activity使用的theme等等,而且当你使用quickfix(mac上的快捷键是alt+enter)给子View添加`onClick事件时,相应的方法代码会插入到这个Activity中。

  • tools:itemCount

只有RecyclerView才能使用这个属性。我的android studio版本是3.0.1,布局编辑器中RecyclerView显示的默认个数是10个,这个属性可以改变RecyclerView显示的个数。

  • tools:layout

只有fragment标签能用这个属性,在preview窗口中可以预览这个layout的样式。

  • tools:listitem / tools:listheader / tools:listfooter

只有AdapterView才能使用这个属性,指定了列表的items、header和footer的布局,不过tools:listitem这个属性RecyclerView也能使用:

<ListView xmlns:android="http://schemas.android.com/apk/res/android"      
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@android:id/list"    
    android:layout_width="match_parent"    
    android:layout_height="match_parent"            
    tools:listitem="@layout/sample_list_item"    
    tools:listheader="@layout/sample_list_header"    
    tools:listfooter="@layout/sample_list_footer" />
  • tools:showIn

适用对象:被<include>引用的任何根View:

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
                                        xmlns:tools="http://schemas.android.com/tools"
                                        android:layout_width="match_parent"
                                        android:layout_height="match_parent"
                                        tools:showIn="@layout/app_bar_main"
                                        tools:itemCount="32">
</android.support.v7.widget.RecyclerView>
  • tools:menu

适用对象:根<View>。告诉IDE 在预览窗口中使用哪个菜单,这个菜单将显示在layout的根节点上(actionbar的位置)。

图片来自http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0309/2567.html

preview窗口很智能,如果布局和一个activity关联(通过tools:context指定)它将会自动查询这个activity的onCreateOptionsMenu方法,以显示菜单,而tools:menu属性则可以覆盖这种默认的行为。

属性的值是menu id,还可以有多个,不同的menu id之间用逗号隔开。

需要注意的是,主题为Theme.AppCompat时,这个属性不起作用。

  • tools:actionBarNavMode

指定actionbar的显示模式,其值可以是:1. standard、2. tabs、3. list

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:actionBarNavMode="tabs" />

同样的,当主题是Theme.AppCompat (r21+, at least) 或者Theme.Material,或者使用了布局包含Toolbar的方式。 该属性也不起作用,只有holo主题才有效。参考

  • tools:minValue / tools:maxValue

适用对象:NumberPicker。预览NumberPicker的最大最小值但是不生效。NumberPicker的maxValue和minValue只能通过代码设置,如果想通过xml设置的话需要另想办法,这里有参考。为什么android studio的xml不支持设置这两个属性呢?我不懂,请大神留言告知。

<NumberPicker xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/numberPicker"    
    android:layout_width="match_parent"    
    android:layout_height="wrap_content"    
    tools:minValue="0"    
    tools:maxValue="10" />
  • tools:openDrawer

适用对象:<DrawerLayout>。让DrawerLayout打开一个方向。

Constant Value Description
end 800005 Push object to the end of its container, not changing its size.
left 3 Push object to the left of its container, not changing its size.
right 5 Push object to the right of its container, not changing its size.
start 800003 Push object to the beginning of its container, not changing its size.
<android.support.v4.widget.DrawerLayout
    xmlns:android="http://schemas.android.com/apk/res/android"        
    xmlns:tools="http://schemas.android.com/tools"    
    android:id="@+id/drawer_layout"    
    android:layout_width="match_parent"    
    android:layout_height="match_parent"    
    tools:openDrawer="start" />
  • "@tools:sample/*" resources

适用对象:所有支持文本和图片的View。这个属性相当于给View加了个placeholder,比如:

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    tools:text="@tools:sample/lorem" />

下面的表格描述了所有能给View使用的placeholder:

Attribute value Description of placeholder data
@tools:sample/full_names Full names that are randomly generated from the combination of @tools:sample/first_names and @tools:sample/last_names.
@tools:sample/first_names Common first names.
@tools:sample/last_names Common last names.
@tools:sample/cities Names of cities from across the world.
@tools:sample/us_zipcodes Randomly generated US zipcodes.
@tools:sample/us_phones Randomly generated phone numbers with the following format: (800) 555-xxxx.
@tools:sample/lorem/random Placeholder text that is derived from Latin.
@tools:sample/date/day_of_week Randomized dates and times for the specified format.
@tools:sample/date/ddmmyy 同上
@tools:sample/date/mmddyy 同上
@tools:sample/date/hhmm 同上
@tools:sample/date/hhmmss 同上
@tools:sample/avatars Vector drawables that you can use as profile avatars.
@tools:sample/backgrounds/scenic Images that you can use as backgrounds.

这些placeholder资源不会打进APK包里面,因此不用担心会增加app体积,只是方便在preview窗口查看预览效果。

下面举两个例子。

比如下面的代码定义了一个RecyclerView,它的tools:listitem="@layout/item_part1"

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/recycler_view"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:listitem="@layout/item_part1" />

再来看下item_part1.xml的代码:

//item_part1.xml    
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
                                             xmlns:app="http://schemas.android.com/apk/res-auto"
                                             xmlns:tools="http://schemas.android.com/tools"
                                             android:layout_width="match_parent"
                                             android:layout_height="wrap_content">

    <ImageView
        android:id="@+id/avatar"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        android:contentDescription="@null"
        app:layout_constraintDimensionRatio="h,1:1"
        app:layout_constraintEnd_toStartOf="@id/name"
        app:layout_constraintHorizontal_chainStyle="packed"
        app:layout_constraintHorizontal_weight="1"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/name"
        tools:src="@tools:sample/avatars"/>

    <TextView
        android:id="@+id/name"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
        app:layout_constraintBottom_toTopOf="@+id/city"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_weight="5"
        app:layout_constraintStart_toEndOf="@id/avatar"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_chainStyle="packed"
        tools:text="@tools:sample/full_names"/>

    <TextView
        android:id="@+id/city"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
        app:layout_constraintBottom_toTopOf="@id/description"
        app:layout_constraintEnd_toStartOf="@id/date"
        app:layout_constraintHorizontal_chainStyle="spread_inside"
        app:layout_constraintStart_toEndOf="@id/avatar"
        app:layout_constraintTop_toBottomOf="@+id/name"
        tools:text="@tools:sample/cities"/>

    <TextView
        android:id="@+id/date"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
        android:gravity="end"
        app:layout_constraintBaseline_toBaselineOf="@id/city"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/city"
        tools:text="@tools:sample/date/ddmmyy"/>

    <TextView
        android:id="@+id/description"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
        android:ellipsize="end"
        android:maxLines="3"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/avatar"
        app:layout_constraintTop_toBottomOf="@+id/city"
        tools:text="@tools:sample/lorem/random"/>
</android.support.constraint.ConstraintLayout>

从上面的代码可以看到,RecyclerView的item包含5个元素:头像avatar、名字name、城市city、日期date和描述description。头像avatar使用的属性是tools:src="@tools:sample/avatars",名字name使用的属性是tools:text="@tools:sample/full_names",城市city使用的属性是tools:text="@tools:sample/cities",日期date使用的属性是tools:text="@tools:sample/date/ddmmyy",描述description使用的属性是tools:text="@tools:sample/lorem/random",最终的preview窗口如图所示:

例子1的 代码地址

例子1中的5个预览内容都是android studio提供的,能不能自定义呢?答案是可以的。我们首先以名字name为例,我们在Android Studio创建一个sample data directory:

神奇的是android studio自动在当前module目录下生成了sampledata目录而不是我们本以为的res目录下,而且再次右击res目录不能再创建sample data directory,除非把原来的sample data directory删掉才行。

然后我们创建一个“names”文件,每一行加一个名字:

//ampledata/names
Mark Allison
Sir Reginald Fortescue Crumplington-Smythe
Pablo Diego José Francisco de Paula Juan Nepomuceno María de los Remedios Cipriano de la Santísima Trinidad Ruiz y Picasso
Millicent Marbles

然后我们把原来的placeholder属性tools:text="@tools:sample/full_names"替换一下:

<TextView
    android:id="@+id/name"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_margin="8dp"
    app:layout_constraintBottom_toTopOf="@+id/city"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintHorizontal_weight="5"
    app:layout_constraintStart_toEndOf="@id/avatar"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintVertical_chainStyle="packed"
    tools:text="@sample/names" />

自定义完名字name,我们再来自定义头像avatar。在sampledata目录下创建avatars目录:

代码使用下面的方式调用:

<ImageView
    android:id="@+id/avatar"
    android:layout_width="0dp"
    android:layout_height="0dp"
    android:layout_marginStart="8dp"
    android:layout_marginEnd="8dp"
    android:contentDescription="@null"
    app:layout_constraintDimensionRatio="h,1:1"
    app:layout_constraintEnd_toStartOf="@id/name"
    app:layout_constraintHorizontal_chainStyle="packed"
    app:layout_constraintHorizontal_weight="1"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="@id/name"
    tools:src="@sample/avatars" />

再来看preview窗口,我们添加了四个头像的VectorDrawable但是preview窗口只显示了2个:

可以看到奇数1和3的头像显示了而偶数2和4并没有,这应该是一个bug,解决办法是1 & 2都用第一个图片,3 & 4都用第二个图片,5 & 6都用第三个图片,7 & 8都用第四个图片:

然后preview窗口就能正确显示我们自定义的头像了:

还有更简单的办法,我们把头像avatar和城市city的内容放到一个json文件中,首先创建一个json文件:

json文件内容如下:

{
  "data": [
    {
      "city": "Hemel Hempstead, Hertfordshire, UK",
      "avatar": "@sample/avatars"
    },
    {
      "city": "Brokenwind, Aberdeenshire, UK",
      "avatar": "@sample/avatars"
    },
    {
      "city": "Málaga, España",
      "avatar": "@sample/avatars"
    },
    {
      "city": "Batchelors Bump, Essex, UK",
      "avatar": "@sample/avatars"
    }
  ]
}

然后我们的头像avatar和城市city就能使用这个json文件来引用:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <ImageView
        android:id="@+id/avatar"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        android:contentDescription="@null"
        app:layout_constraintDimensionRatio="h,1:1"
        app:layout_constraintEnd_toStartOf="@id/name"
        app:layout_constraintHorizontal_chainStyle="packed"
        app:layout_constraintHorizontal_weight="1"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/name"
        tools:src="@sample/users.json/data/avatar"/>

    <TextView
        android:id="@+id/name"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
        app:layout_constraintBottom_toTopOf="@+id/city"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_weight="5"
        app:layout_constraintStart_toEndOf="@id/avatar"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_chainStyle="packed"
        tools:text="@sample/names"/>

    <TextView
        android:id="@+id/city"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
        app:layout_constraintBottom_toTopOf="@id/description"
        app:layout_constraintEnd_toStartOf="@id/date"
        app:layout_constraintHorizontal_chainStyle="spread_inside"
        app:layout_constraintStart_toEndOf="@id/avatar"
        app:layout_constraintTop_toBottomOf="@+id/name"
        tools:text="@sample/users.json/data/city"/>

    <TextView
        android:id="@+id/date"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
        android:gravity="end"
        app:layout_constraintBaseline_toBaselineOf="@id/city"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/city"
        tools:text="@tools:sample/date/ddmmyy"/>

    <TextView
        android:id="@+id/description"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
        android:ellipsize="end"
        android:maxLines="3"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/avatar"
        app:layout_constraintTop_toBottomOf="@+id/city"
        tools:text="@tools:sample/lorem/random"/>
</android.support.constraint.ConstraintLayout>

最终的preview窗口:

例子2的 代码地址

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 159,117评论 4 362
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,328评论 1 293
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,839评论 0 243
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 44,007评论 0 206
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,384评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,629评论 1 219
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,880评论 2 313
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,593评论 0 198
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,313评论 1 243
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,575评论 2 246
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,066评论 1 260
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,392评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,052评论 3 236
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,082评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,844评论 0 195
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,662评论 2 274
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,575评论 2 270

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 170,569评论 25 707
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,100评论 18 139
  • Spring Boot 参考指南 介绍 转载自:https://www.gitbook.com/book/qbgb...
    毛宇鹏阅读 46,360评论 6 343
  • 01 如果拥有这样的早餐,那这一定是治愈赖床最好的方法!! 早餐在我的定义里一直就是简单,甚至是可有可无,随随便便...
    时光里的小人儿阅读 1,437评论 2 2
  • 我渴望自由,渴望自由之光 我渴望灵魂,渴望灵魂交汇 我渴望快乐,渴望及时行乐 人生苦短,及时行乐 不要彷徨眼前的得...
    爱说话的小女孩阅读 142评论 0 1