├── .github └── dco.yml ├── .gitignore ├── aggregating.yml ├── application-dev.yml ├── application.yml ├── bar.properties ├── books.xml ├── configserver.yml ├── eureka.yml ├── foo-db.properties ├── foo-dev.yml ├── foo-development-db.properties ├── foo-development.properties ├── foo.properties ├── logtest.yml ├── processor.yml ├── samplebackendservice-development.properties ├── samplebackendservice.properties ├── samplefrontendservice.properties ├── stores.yml ├── subdir └── test.txt ├── test.json ├── text-resource.txt └── zuul.properties /.github/dco.yml: -------------------------------------------------------------------------------- 1 | require: 2 | members: false 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #* 2 | *# 3 | .#* 4 | *~ 5 | .idea 6 | *.iml 7 | .factorypath 8 | -------------------------------------------------------------------------------- /aggregating.yml: -------------------------------------------------------------------------------- 1 | ingredients.threshold: 1000 2 | -------------------------------------------------------------------------------- /application-dev.yml: -------------------------------------------------------------------------------- 1 | my.prop: from application-dev.yml 2 | -------------------------------------------------------------------------------- /application.yml: -------------------------------------------------------------------------------- 1 | info: 2 | description: Spring Cloud Samples 3 | url: https://github.com/spring-cloud-samples 4 | eureka: 5 | client: 6 | serviceUrl: 7 | defaultZone: http://localhost:8761/eureka/ 8 | 9 | foo: baz 10 | 11 | --- 12 | spring: 13 | config.activate.on-profile: cloud 14 | cloud: 15 | config: 16 | uri: ${vcap.services.${PREFIX:}configserver.credentials.uri:http://user:password@${PREFIX:}configserver.${application.domain:cfapps.io}} 17 | oauth2: 18 | client: 19 | tokenUri: ${vcap.services.${PREFIX:}sso.credentials.tokenUri:} 20 | authorizationUri: ${vcap.services.${PREFIX:}sso.credentials.authorizationUri:} 21 | clientId: ${vcap.services.${PREFIX:}sso.credentials.clientId:} 22 | clientSecret: ${vcap.services.${PREFIX:}sso.credentials.clientSecret:} 23 | resource: 24 | tokenInfoUri: ${vcap.services.${OAUTH2_RESOURCE_SERVICEID:${oauth2.resource.serviceId:sso}}.credentials.tokenInfoUri:} 25 | serviceId: ${PREFIX:}resource 26 | application: 27 | domain: ${APPLICATION_DOMAIN:cfapps.io} 28 | endpoints: 29 | restart: enabled 30 | eureka: 31 | password: password 32 | instance: 33 | hostname: ${vcap.application.uris[0]:localhost} 34 | nonSecurePort: 80 35 | client: 36 | serviceUrl: 37 | defaultZone: ${vcap.services.${PREFIX:}eureka.credentials.uri:http://user:${eureka.password:}@${PREFIX:}eureka.${application.domain:cfapps.io}}/eureka/ 38 | hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 60000 39 | ribbon: 40 | ConnectTimeout: 3000 41 | ReadTimeout: 60000 42 | 43 | --- 44 | spring: 45 | config.activate.on-profile: docker 46 | cloud: 47 | config: 48 | uri: http://${CONFIGSERVER_1_PORT_8888_TCP_ADDR:localhost}:8888 49 | endpoints: 50 | restart: enabled 51 | eureka: 52 | instance: 53 | nonSecurePort: 80 54 | preferIpAddress: true 55 | client: 56 | serviceUrl: 57 | defaultZone: http://${EUREKA_1_PORT_8761_TCP_ADDR:localhost}:8761/eureka/ 58 | 59 | -------------------------------------------------------------------------------- /bar.properties: -------------------------------------------------------------------------------- 1 | foo: bar2 2 | -------------------------------------------------------------------------------- /books.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Gambardella, Matthew 5 | XML Developer's Guide 6 | Computer 7 | 44.95 8 | 2000-10-01 9 | An in-depth look at creating applications 10 | with XML. 11 | 12 | 13 | Ralls, Kim 14 | Midnight Rain 15 | Fantasy 16 | 5.95 17 | 2000-12-16 18 | A former architect battles corporate zombies, 19 | an evil sorceress, and her own childhood to become queen 20 | of the world. 21 | 22 | 23 | Corets, Eva 24 | Maeve Ascendant 25 | Fantasy 26 | 5.95 27 | 2000-11-17 28 | After the collapse of a nanotechnology 29 | society in England, the young survivors lay the 30 | foundation for a new society. 31 | 32 | 33 | Corets, Eva 34 | Oberon's Legacy 35 | Fantasy 36 | 5.95 37 | 2001-03-10 38 | In post-apocalypse England, the mysterious 39 | agent known only as Oberon helps to create a new life 40 | for the inhabitants of London. Sequel to Maeve 41 | Ascendant. 42 | 43 | 44 | Corets, Eva 45 | The Sundered Grail 46 | Fantasy 47 | 5.95 48 | 2001-09-10 49 | The two daughters of Maeve, half-sisters, 50 | battle one another for control of England. Sequel to 51 | Oberon's Legacy. 52 | 53 | 54 | Randall, Cynthia 55 | Lover Birds 56 | Romance 57 | 4.95 58 | 2000-09-02 59 | When Carla meets Paul at an ornithology 60 | conference, tempers fly as feathers get ruffled. 61 | 62 | 63 | Thurman, Paula 64 | Splish Splash 65 | Romance 66 | 4.95 67 | 2000-11-02 68 | A deep sea diver finds true love twenty 69 | thousand leagues beneath the sea. 70 | 71 | 72 | Knorr, Stefan 73 | Creepy Crawlies 74 | Horror 75 | 4.95 76 | 2000-12-06 77 | An anthology of horror stories about roaches, 78 | centipedes, scorpions and other insects. 79 | 80 | 81 | Kress, Peter 82 | Paradox Lost 83 | Science Fiction 84 | 6.95 85 | 2000-11-02 86 | After an inadvertant trip through a Heisenberg 87 | Uncertainty Device, James Salway discovers the problems 88 | of being quantum. 89 | 90 | 91 | O'Brien, Tim 92 | Microsoft .NET: The Programming Bible 93 | Computer 94 | 36.95 95 | 2000-12-09 96 | Microsoft's .NET initiative is explored in 97 | detail in this deep programmer's reference. 98 | 99 | 100 | O'Brien, Tim 101 | MSXML3: A Comprehensive Guide 102 | Computer 103 | 36.95 104 | 2000-12-01 105 | The Microsoft MSXML3 parser is covered in 106 | detail, with attention to XML DOM interfaces, XSLT processing, 107 | SAX and more. 108 | 109 | 110 | Galos, Mike 111 | Visual Studio 7: A Comprehensive Guide 112 | Computer 113 | 49.95 114 | 2001-04-16 115 | Microsoft Visual Studio 7 is explored in depth, 116 | looking at how Visual Basic, Visual C++, C#, and ASP+ are 117 | integrated into a comprehensive development 118 | environment. 119 | 120 | 121 | -------------------------------------------------------------------------------- /configserver.yml: -------------------------------------------------------------------------------- 1 | info.description: configserver 2 | --- 3 | spring: 4 | config.activate.on-profile: cloud 5 | service: 6 | definition: 7 | metadata: 8 | uri: http://${spring.application.name}.${application.domain:cfapps.io} 9 | -------------------------------------------------------------------------------- /eureka.yml: -------------------------------------------------------------------------------- 1 | --- 2 | spring: 3 | config.activate.on-profile: cloudpeers 4 | eureka: 5 | client: 6 | serviceUrl: 7 | defaultZone: ${vcap.services.${PREFIX:}othereureka.credentials.uri:http://${PREFIX:}othereureka.${application.domain:cfapps.io}}/eureka/ 8 | 9 | --- 10 | spring: 11 | config.activate.on-profile: docker 12 | eureka: 13 | client: 14 | serviceUrl: 15 | defaultZone: http://localhost:8761/eureka/ 16 | -------------------------------------------------------------------------------- /foo-db.properties: -------------------------------------------------------------------------------- 1 | foo.db: mycooldb 2 | -------------------------------------------------------------------------------- /foo-dev.yml: -------------------------------------------------------------------------------- 1 | bar: spam 2 | foo: from foo development 3 | democonfigclient.message: hello from dev profile 4 | -------------------------------------------------------------------------------- /foo-development-db.properties: -------------------------------------------------------------------------------- 1 | combined: true 2 | -------------------------------------------------------------------------------- /foo-development.properties: -------------------------------------------------------------------------------- 1 | bar: spam 2 | foo: from foo development 3 | -------------------------------------------------------------------------------- /foo.properties: -------------------------------------------------------------------------------- 1 | foo: from foo props 2 | democonfigclient.message: hello spring io 3 | -------------------------------------------------------------------------------- /logtest.yml: -------------------------------------------------------------------------------- 1 | logging: 2 | level: 3 | com.example: 4 | foo: DEBUG 5 | bar: DEBUG 6 | -------------------------------------------------------------------------------- /processor.yml: -------------------------------------------------------------------------------- 1 | --- 2 | spring: 3 | config.activate.on-profile: cloud 4 | data: 5 | mongodb: 6 | uri: ${vcap.services.${PREFIX:}mongodb.credentials.uri} 7 | demo: 8 | baseUri: http://${eureka.instance.hostname} 9 | -------------------------------------------------------------------------------- /samplebackendservice-development.properties: -------------------------------------------------------------------------------- 1 | bar: spam -------------------------------------------------------------------------------- /samplebackendservice.properties: -------------------------------------------------------------------------------- 1 | foo: live from phoenix again 2 | -------------------------------------------------------------------------------- /samplefrontendservice.properties: -------------------------------------------------------------------------------- 1 | foo: bar2 2 | logging.level.org.springframework.web: DEBUG 3 | -------------------------------------------------------------------------------- /stores.yml: -------------------------------------------------------------------------------- 1 | foo: '{cipher}{key:test}AQCST0WVyBi2M5w1KWyzV6DNGXKBgk5Yd9QnbVv4rSj+7HhgsJh5gQTI/CZvV/wHZqYtYrGxJJ3TCdXc/gBP4dbkBDdOEJOq+u7UUqNTOd2693FgOp5CeoMREUOmLp9r0CtF4TZLdjZfs4kxiBPVPd5fEaz9ULIgtgLSdS2oUEg6UXr3LA/M7P8YchkEPYUyf+VxGUDe587XPffHMU4zmvhmoTSen9BAc5BuGK+FZ3GFe12MDEPkNQ0uY002FitEfmgON65Xh3eJtNxCbUXJTj+oDc0icePqOgnG0gc17MymZdcJCIhP+cCiS6LzS57vhP+xGZvBBBHnw00ZVzHX73UfKkC9GLsnEVVQO5Xf2COR/rGZqvLJNKgvSHcbf03PrhQ=' 2 | --- 3 | spring: 4 | profiles: cloud 5 | data: 6 | mongodb: 7 | uri: ${vcap.services.${PREFIX:}mongodb.credentials.uri} 8 | -------------------------------------------------------------------------------- /subdir/test.txt: -------------------------------------------------------------------------------- 1 | This is text served from a subdirectory 2 | -------------------------------------------------------------------------------- /test.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "_id": "56f051673a6f1037be9a3ccb", 4 | "index": 0, 5 | "guid": "2b403b4b-8b4f-4bf4-8fc0-c957e9c92596", 6 | "isActive": true, 7 | "balance": "$2,210.39", 8 | "picture": "http://placehold.it/32x32", 9 | "age": 25, 10 | "eyeColor": "blue", 11 | "name": { 12 | "first": "Audra", 13 | "last": "Mendez" 14 | }, 15 | "company": "NEXGENE", 16 | "email": "audra.mendez@nexgene.io", 17 | "phone": "+1 (812) 461-2870", 18 | "address": "715 Ebony Court, Logan, New Hampshire, 9176", 19 | "about": "Sit deserunt nulla nulla incididunt et dolor anim eiusmod exercitation. Dolore dolor elit laborum aliquip esse amet id. Est ipsum sit voluptate duis cillum ut tempor ipsum pariatur adipisicing sunt. Consequat officia ut tempor id et reprehenderit et veniam ullamco anim qui sint aliquip tempor. Cillum laborum veniam ullamco enim consectetur veniam quis dolor nostrud officia.", 20 | "registered": "Tuesday, February 18, 2014 6:54 PM", 21 | "latitude": "-54.035224", 22 | "longitude": "-18.578621", 23 | "tags": [ 24 | 7, 25 | "irure" 26 | ], 27 | "range": [ 28 | 0, 29 | 1, 30 | 2, 31 | 3, 32 | 4, 33 | 5, 34 | 6, 35 | 7, 36 | 8, 37 | 9 38 | ], 39 | "friends": [ 40 | 3, 41 | { 42 | "id": 1, 43 | "name": "Hillary Hutchinson" 44 | } 45 | ], 46 | "greeting": "Hello, Audra! You have 9 unread messages.", 47 | "favoriteFruit": "apple" 48 | }, 49 | { 50 | "_id": "56f0516768d43b3ea3b7561f", 51 | "index": 1, 52 | "guid": "cbc8e72f-511b-406b-b3c8-d44a5ea78f2f", 53 | "isActive": true, 54 | "balance": "$3,096.58", 55 | "picture": "http://placehold.it/32x32", 56 | "age": 26, 57 | "eyeColor": "blue", 58 | "name": { 59 | "first": "Merle", 60 | "last": "Wooten" 61 | }, 62 | "company": "EDECINE", 63 | "email": "merle.wooten@edecine.ca", 64 | "phone": "+1 (842) 447-2285", 65 | "address": "142 Hendrix Street, Bartley, Arizona, 5777", 66 | "about": "Ea sunt veniam labore qui ad. Sint nisi aliqua laborum dolor do voluptate cupidatat eu. Enim deserunt anim excepteur enim labore et nostrud elit consectetur excepteur nostrud aliquip dolor adipisicing. Irure aliquip incididunt proident culpa.", 67 | "registered": "Thursday, April 10, 2014 4:58 AM", 68 | "latitude": "-8.395754", 69 | "longitude": "75.771414", 70 | "tags": [ 71 | 7, 72 | "irure" 73 | ], 74 | "range": [ 75 | 0, 76 | 1, 77 | 2, 78 | 3, 79 | 4, 80 | 5, 81 | 6, 82 | 7, 83 | 8, 84 | 9 85 | ], 86 | "friends": [ 87 | 3, 88 | { 89 | "id": 1, 90 | "name": "Hillary Hutchinson" 91 | } 92 | ], 93 | "greeting": "Hello, Merle! You have 5 unread messages.", 94 | "favoriteFruit": "strawberry" 95 | }, 96 | { 97 | "_id": "56f05167d299eab579202f1e", 98 | "index": 2, 99 | "guid": "46f24b5b-f8e3-486b-8b3a-0b0784f513d9", 100 | "isActive": true, 101 | "balance": "$3,437.48", 102 | "picture": "http://placehold.it/32x32", 103 | "age": 39, 104 | "eyeColor": "green", 105 | "name": { 106 | "first": "Lupe", 107 | "last": "Lewis" 108 | }, 109 | "company": "HOMELUX", 110 | "email": "lupe.lewis@homelux.me", 111 | "phone": "+1 (877) 548-3554", 112 | "address": "146 Terrace Place, Derwood, Pennsylvania, 2599", 113 | "about": "Aute sint id aliqua ipsum consectetur exercitation nisi. Minim ex laborum eu do. Sunt laborum enim deserunt culpa aliqua eu consectetur.", 114 | "registered": "Sunday, April 12, 2015 2:47 PM", 115 | "latitude": "-45.907896", 116 | "longitude": "-128.202572", 117 | "tags": [ 118 | 7, 119 | "irure" 120 | ], 121 | "range": [ 122 | 0, 123 | 1, 124 | 2, 125 | 3, 126 | 4, 127 | 5, 128 | 6, 129 | 7, 130 | 8, 131 | 9 132 | ], 133 | "friends": [ 134 | 3, 135 | { 136 | "id": 1, 137 | "name": "Hillary Hutchinson" 138 | } 139 | ], 140 | "greeting": "Hello, Lupe! You have 5 unread messages.", 141 | "favoriteFruit": "strawberry" 142 | }, 143 | { 144 | "_id": "56f05167aaf3df75213406b1", 145 | "index": 3, 146 | "guid": "c9f2570b-76c5-4326-809e-fb7797e0d1cc", 147 | "isActive": false, 148 | "balance": "$1,543.14", 149 | "picture": "http://placehold.it/32x32", 150 | "age": 34, 151 | "eyeColor": "blue", 152 | "name": { 153 | "first": "Swanson", 154 | "last": "Mccarthy" 155 | }, 156 | "company": "MITROC", 157 | "email": "swanson.mccarthy@mitroc.co.uk", 158 | "phone": "+1 (954) 466-3219", 159 | "address": "420 Merit Court, Frystown, Oregon, 4940", 160 | "about": "Culpa incididunt adipisicing nostrud velit in veniam officia. Consequat voluptate mollit tempor eu velit aliqua commodo nulla nisi irure. Velit non incididunt amet proident deserunt officia velit cillum. Non exercitation veniam commodo deserunt Lorem velit incididunt ullamco dolor eu est consectetur. Commodo aliqua in minim minim eu. Labore sunt non aute tempor elit ut tempor deserunt.", 161 | "registered": "Thursday, November 19, 2015 5:44 PM", 162 | "latitude": "29.438056", 163 | "longitude": "-5.197729", 164 | "tags": [ 165 | 7, 166 | "irure" 167 | ], 168 | "range": [ 169 | 0, 170 | 1, 171 | 2, 172 | 3, 173 | 4, 174 | 5, 175 | 6, 176 | 7, 177 | 8, 178 | 9 179 | ], 180 | "friends": [ 181 | 3, 182 | { 183 | "id": 1, 184 | "name": "Hillary Hutchinson" 185 | } 186 | ], 187 | "greeting": "Hello, Swanson! You have 10 unread messages.", 188 | "favoriteFruit": "banana" 189 | }, 190 | { 191 | "_id": "56f051675b6417531450dd6f", 192 | "index": 4, 193 | "guid": "40b284d8-00a3-4778-8215-4781e3ed5df3", 194 | "isActive": true, 195 | "balance": "$2,520.39", 196 | "picture": "http://placehold.it/32x32", 197 | "age": 24, 198 | "eyeColor": "blue", 199 | "name": { 200 | "first": "Casey", 201 | "last": "Dotson" 202 | }, 203 | "company": "IMKAN", 204 | "email": "casey.dotson@imkan.biz", 205 | "phone": "+1 (853) 506-2464", 206 | "address": "881 Sedgwick Street, Goodville, Hawaii, 7857", 207 | "about": "Officia exercitation aliqua anim deserunt sint. Elit incididunt laboris deserunt dolor sit veniam Lorem. Laboris anim non ad sint pariatur veniam cupidatat. Enim in quis reprehenderit ex amet laboris ea tempor. Labore laboris voluptate ipsum tempor sunt esse velit ex nisi. Minim sit pariatur Lorem elit occaecat.", 208 | "registered": "Saturday, August 15, 2015 8:30 PM", 209 | "latitude": "-58.150569", 210 | "longitude": "164.512045", 211 | "tags": [ 212 | 7, 213 | "irure" 214 | ], 215 | "range": [ 216 | 0, 217 | 1, 218 | 2, 219 | 3, 220 | 4, 221 | 5, 222 | 6, 223 | 7, 224 | 8, 225 | 9 226 | ], 227 | "friends": [ 228 | 3, 229 | { 230 | "id": 1, 231 | "name": "Hillary Hutchinson" 232 | } 233 | ], 234 | "greeting": "Hello, Casey! You have 10 unread messages.", 235 | "favoriteFruit": "apple" 236 | } 237 | ] 238 | -------------------------------------------------------------------------------- /text-resource.txt: -------------------------------------------------------------------------------- 1 | Hello Toronto 2 | -------------------------------------------------------------------------------- /zuul.properties: -------------------------------------------------------------------------------- 1 | zuul.route.samplebackendservice=/hello 2 | zuul.route.samplefrontendservice=/ 3 | zuul.route.hystrixdashboard=/hystrix-dashboard 4 | --------------------------------------------------------------------------------