Today is June 7, 2019, fucking happened
Ali cloud es product 6.3.2, actually disabled transportClient (default port 9300), I have developed a good test environment. On a pre-made ignorant force .. FML?
how to do ...
find a variety of information
![5313659-7df8f8500b3603eb.png](https://upload-images.jianshu.io/upload_images/5313659-7df8f8500b3603eb.png)
However, and eggs ..
3.2.0.M4 elasticsearch version 6.7.2 is used by default
hateful is valid, since version 6.7 adds a parameter, include_type_name, because the 8.0 version to completely remove type.
Increasing this field, so I call elasticsearchTemplete create the index because when the bombing .. api automatically with the parameters I just said
public static final String INCLUDE_TYPE_NAME_PARAMETER = "include_type_name";
Then I began to do things
Download Source
1. warehouse address into your address PW
![5313659-2527959c90575b96.png](https://upload-images.jianshu.io/upload_images/5313659-2527959c90575b96.png)
2. The comments section of code. Because the package will complain when
![5313659-365dfd14c1292d05.png](https://upload-images.jianshu.io/upload_images/5313659-365dfd14c1292d05.png)
3. Find all local codes use the default are to true
![5313659-5229d66799898d6d.png](https://upload-images.jianshu.io/upload_images/5313659-5229d66799898d6d.png)
ps, jdk version 12, gradle version 5.4.1
4. After the change, packaging, coupled with this argument, the official compiler package
![5313659-c2886826d54e56b7.png](https://upload-images.jianshu.io/upload_images/5313659-c2886826d54e56b7.png)
ps, if the PW has 6.7.2 version of the first went delete. Then go to a local warehouse, delete the .jar-release version is not allowed to cover
this point, the bottom section has been modified
Let's change the second module
Download Source spring data es and modify their own warehouses
![5313659-ecc0ccd80b2cd88a.png](https://upload-images.jianshu.io/upload_images/5313659-ecc0ccd80b2cd88a.png)
Then so what needs to change himself to the top of
that the next version of the m4 usage
esconfig
![5313659-81507e028164d482.png](https://upload-images.jianshu.io/upload_images/5313659-81507e028164d482.png)
repository usage
![5313659-5336da1040f42997.png](https://upload-images.jianshu.io/upload_images/5313659-5336da1040f42997.png)
Official intend to support alias, but the m4 version download. Did not see support code, I realized myself
This interface ElasticsearchPersistentEntity new alias () method
![5313659-670f3099ad79de95.png](https://upload-images.jianshu.io/upload_images/5313659-670f3099ad79de95.png)
Add the following code to achieve Class
![5313659-52a82b9f40360f71.png](https://upload-images.jianshu.io/upload_images/5313659-52a82b9f40360f71.png)
RestTemplete achieve alias
![5313659-47aa01b1286de0bb.png](https://upload-images.jianshu.io/upload_images/5313659-47aa01b1286de0bb.png)
Upload, packaging, perfect
Reproduced in: https: //www.jianshu.com/p/de6521633f4b