This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // org.springframework.cloud:spring-cloud-starter-oauth2 | |
| // org.springframework.boot:spring-boot-starter-data-jpa | |
| // com.h2database:h2 | |
| // redefine: spring-security.version == 4.1.0.RELEASE | |
| package com.example; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.CommandLineRunner; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // org.springframework.cloud:spring-cloud-starter-oauth2 | |
| // org.springframework.boot:spring-boot-starter-data-jpa | |
| // com.h2database:h2 | |
| // redefine: spring-security.version == 4.1.0.RELEASE | |
| package com.example | |
| import org.springframework.beans.factory.annotation.Autowired | |
| import org.springframework.boot.CommandLineRunner | |
| import org.springframework.boot.SpringApplication |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // put the following in a script (hi.groovy) | |
| @RestController | |
| class GreetingRestController { | |
| @RequestMapping("/hi/{n}") | |
| def hi(@PathVariable String n){ | |
| [ greeting : "Hello, " + n +"!" ] | |
| } | |
| } | |
| // then on the shell run the following |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| set -e | |
| WS=$HOME/workspace | |
| O=my-org | |
| S=dev | |
| # make sure you have common buildchain tools like GCC (XCode!) installed | |
| brew tap xoebus/homebrew-cloudfoundry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import os | |
| import sys | |
| import urllib2 | |
| import json | |
| def cf_app_services(app_name, token): | |
| app_name = app_name.strip() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package deployment; | |
| import org.apache.commons.logging.Log; | |
| import org.apache.commons.logging.LogFactory; | |
| import org.cloudfoundry.client.lib.CloudCredentials; | |
| import org.cloudfoundry.client.lib.CloudFoundryClient; | |
| import org.cloudfoundry.client.lib.domain.CloudApplication; | |
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.boot.CommandLineRunner; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package demo; | |
| import org.springframework.beans.factory.InitializingBean; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.context.annotation.Bean; | |
| import java.util.ArrayList; | |
| import java.util.List; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package demo; | |
| import co.freeside.betamax.Betamax; | |
| import co.freeside.betamax.Recorder; | |
| import org.junit.Before; | |
| import org.junit.Rule; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.test.SpringApplicationConfiguration; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package spring; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.beans.factory.annotation.Qualifier; | |
| import org.springframework.context.annotation.AnnotationConfigApplicationContext; | |
| import org.springframework.context.annotation.ComponentScan; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.stereotype.Component; | |
| import javax.annotation.PostConstruct; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package spring; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.beans.factory.annotation.Qualifier; | |
| import org.springframework.context.annotation.AnnotationConfigApplicationContext; | |
| import org.springframework.context.annotation.ComponentScan; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.stereotype.Component; | |
| import javax.annotation.PostConstruct; |