Starting from 2021.0.1.0, the SCA version will correspond to the Spring Cloud version, the first three are the Spring Cloud version, and the last one is the extended version.
*Note:* The `spring-cloud-starter-alibaba-nacos-config` module removes the `spring-cloud-starter-bootstrap` dependency. If you want to use with the bootstrap way, you need to manually add this dependency, now recommended to import configuration using `spring.config.import`.
After completing the above steps, you can smoothly switch to the `Spring Cloud Alibaba 2021.0.1.0` version.
- If `spring-cloud-starter-alibaba-nacos-config` is using and the configuration is imported using the `spring.config.import` way, the project will automatically detect whether the `nacos:` entry has been imported. If there is no import nacos entry, the following error will occur:
The spring.config.import property is missing a nacos: entry
Action:
Add a spring.config.import=nacos: property to your configuration.
If configuration is not required add spring.config.import=optional:nacos: instead.
To disable this check, set spring.cloud.nacos.config.import-check.enabled=false.
----
You can manually turn it off by setting `spring.cloud.nacos.config.import-check.enabled=false`, but it is not recommended to do so, this function can help you check whether to introduce unnecessary dependencies.
- If you want to keep the previous usage (bootstrap way), you only need to add the dependency `spring-cloud-starter-bootstrap` dependency and don't need modifying a line of code.
you can go https://github.com/alibaba/spring-cloud-alibaba/tree/2021.x/spring-cloud-alibaba-examples/nacos-example/nacos-config-example[here] to see the complete example.
Add new configuration item `spring.cloud.nacos.discovery.failure-tolerance-enabled`. Set to true (default false) to enable acos service discovery failure fault tolerance. This feature will return the last instance obtained when nacos fails to get instances. It can provide fault tolerance when the nacos server network is unstable, and will not cause all requests to hang up.
==== Support Feign Circuit Breaker Configuration
When Sentinel is implemented as a Spring Cloud circuit breaker, support for adding circuit breaker configuration for each FeignClient.
This feature also supports dynamic refresh from the configuration center. You can put the above configuration into the configuration center (nacos, consul), and the modified rules will take effect immediately. If you do not need this feature, you can set `feign.sentinel.enable-refresh-rules=false` to disable it.
*Note:* If you are using `spring-cloud-starter-alibaba-sentinel`, please *DO NOT* configure `feign.sentinel.enable=true`, it will invalidate the configuration.
You can go https://github.com/alibaba/spring-cloud-alibaba/tree/2021.x/spring-cloud-alibaba-examples/sentinel-example/sentinel-circuitbreaker-example[here] to see the complete example.
1. After Spring Boot 2.6, the prohibition of circular reference is enabled by default. It is recommended that you do not change it. This is a bad coding practice. If there is a circular reference in your project, please choose to refactor it.
2. Abandoning the way of importing configuration from the bootstrap way and using `spring.config.import` to import configuration, Spring Boot 2.4 has done a lot of optimization work on this, and it is no longer necessary to start a full container to refresh the environment.