Spring Cloud Documentation.hidden { display: none; } .switch { border-width: 1px 1px 0 1px; border-style: solid; border-color: #7a2518; display: inline-block; } .switch--item { padding: 10px; background-color: #ffffff; color: #7a2518; display: inline-block; cursor: pointer; } .switch--item:not(:first-child) { border-width: 0 0 0 1px; border-style: solid; border-color: #7a2518; } .switch--item.selected { background-color: #7a2519; color: #ffffff; } function addBlockSwitches() { for (var primary of document.querySelectorAll('.primary')) { var switchItem = createSwitchItem(primary, createBlockSwitch(primary)); switchItem.item.classList.add("selected"); var title = primary.querySelector('.title') title.remove(); } for (var secondary of document.querySelectorAll('.secondary')) { var primary = findPrimary(secondary); if (primary === null) { console.error("Found secondary block with no primary sibling"); } else { var switchItem = createSwitchItem(secondary, primary.querySelector('.switch')); switchItem.content.classList.add("hidden"); primary.append(switchItem.content); secondary.remove(); } } } function createElementFromHtml(html) { var template = document.createElement('template'); template.innerHTML = html; return template.content.firstChild; } function createBlockSwitch(primary) { var blockSwitch = createElementFromHtml('\
\'); primary.prepend(blockSwitch) return blockSwitch; } function findPrimary(secondary) { var candidate = secondary.previousElementSibling; while (candidate != null && !candidate.classList.contains('primary')) { candidate = candidate.previousElementSibling; } return candidate; } function createSwitchItem(block, blockSwitch) { var blockName = block.querySelector('.title').textContent; var content = block.querySelectorAll('.content').item(0); var colist = nextSibling(block, '.colist'); if (colist != null) { content.append(colist); } var item = createElementFromHtml('\
' + blockName + '\'); item.dataset.blockName = blockName; content.dataset.blockName = blockName; blockSwitch.append(item); return {'item': item, 'content': content}; } function nextSibling(element, selector) { var sibling = element.nextElementSibling; while (sibling) { if (sibling.matches(selector)) { return sibling; } sibling = sibling.nextElementSibling; } } function globalSwitch() { document.querySelectorAll(".switch--item").forEach(function(item) { var blockId = blockIdForSwitchItem(item); var handler = function(event) { selectedText = event.target.textContent; window.localStorage.setItem(blockId, selectedText); for (var switchItem of document.querySelectorAll(".switch--item")) { if (blockIdForSwitchItem(switchItem) === blockId && switchItem.textContent === selectedText) { select(switchItem); } } } item.addEventListener("click", handler); if (item.textContent === window.localStorage.getItem(blockId)) { select(item); } }); } function select(selected) { for (var child of selected.parentNode.children) { child.classList.remove("selected"); } selected.classList.add("selected"); for (var child of selected.parentNode.parentNode.children) { if (child.classList.contains("content")) { if (selected.dataset.blockName === child.dataset.blockName) { child.classList.remove("hidden"); } else { child.classList.add("hidden"); } } } } function blockIdForSwitchItem(item) { idComponents = [] for (var switchItem of item.parentNode.querySelectorAll(".switch--item")) { idComponents.push(switchItem.textContent.toLowerCase()); } return idComponents.sort().join("-") } window.onload = function() { addBlockSwitches(); globalSwitch(); }; # Spring Cloud Documentation Table of Contents * [1. About the Documentation](#documentation-about) * [2. Getting Help](#documentation-getting-help) This section provides a brief overview of Spring Cloud reference documentation. It serves as a map for the rest of the document. ## [](#documentation-about)[1. About the Documentation](#documentation-about) The Spring Cloud reference guide is available as * [Multi-page HTML](https://docs.spring.io/spring-cloud/docs/2021.0.1/reference/html) * [Single-page HTML](https://docs.spring.io/spring-cloud/docs/2021.0.1/reference/htmlsingle) * [PDF](https://docs.spring.io/spring-cloud/docs/2021.0.1/reference/pdf/spring-cloud.pdf) Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically. ## [](#documentation-getting-help)[2. Getting Help](#documentation-getting-help) If you have trouble with Spring Cloud, we would like to help. * Learn the Spring Cloud basics. If you are starting out with Spring Cloud, try one of the [guides](https://spring.io/guides). * Ask a question. We monitor [stackoverflow.com](https://stackoverflow.com) for questions tagged with [`spring-cloud`](https://stackoverflow.com/tags/spring-cloud). * Chat with us at [Spring Cloud Gitter](https://gitter.im/spring-cloud/spring-cloud) | |All of Spring Cloud is open source, including the documentation. If you find
problems with the docs or if you want to improve them, please get involved.| |---|------------------------------------------------------------------------------------------------------------------------------------------------------------| if (window.parent == window) {(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1\*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-2728886-23', 'auto', {'siteSpeedSampleRate': 100});ga('send', 'pageview');}