<commit_before>= Spring Cloud Services

Spring Cloud Services for Pivotal Cloud Foundry® (PCF) packages server-side components of Spring Cloud projects, such as Spring Cloud Netflix and Spring Cloud Config, and makes them available as services in the Marketplace. This frees you from having to implement and maintain your own managed services in order to use the included projects. Taking advantage of these battle-tested patterns, and of the libraries that implement them, can now be as simple as including a few dependencies in your application build file and applying the appropriate annotation in your source code.

It leverages libraries and services from Spring Cloud and Netflix OSS to compose the system.

https://network.pivotal.io/products/p-spring-cloud-services[Spring Cloud Services] package.

> These services are for deployment in a local dev machine or on Pivotal Web Services on run.pivotal.io

== Building

. Using Maven, build and package the application:
+
----
$ mvn package
----
+
Maven will automatically download all dependencies. This may take a few moments.


== Deploying to Pivotal Cloud Foundry with Spring Cloud Services

. Run `cf push` to create the services that you need:
This will push a Spring Cloud Config Server, a Eureka server, and a Hystrix Dashboard, all with random routes.
+
----
$ cf push -f manifest-services.yml
----


. In the Pivotal Cloud Foundry App Manager console, click on the *Manage* links for the *Config Server*. Once the service is initialized and the web form appears, paste https://github.com/pivotal-anz/cf-SpringBootTrader-config.git into the *Git URI* field and click *Submit*.

. Also click on the *Manage* links for the *Service Registry* and *Circuit Breaker*. Make sure the services are finished initializing before you proceed.

+
. Then create User Provided Services using the URI's created when you pushed the apps:
+
----
cf cups config-service -p '{"uri":"http://config-server-fluxional-suttee.cfapps.io"}'
cf cups service-registry -p '{"uri":"http://eureka-unprevalent-toper.cfapps.io"}'
cf cs elephantsql turtle fortunes-db
----
<commit_msg>Update README.adoc<commit_after>= Spring Cloud Services

Spring Cloud Services for Pivotal Cloud Foundry® (PCF) packages server-side components of Spring Cloud projects, such as Spring Cloud Netflix and Spring Cloud Config, and makes them available as services in the Marketplace. This frees you from having to implement and maintain your own managed services in order to use the included projects. Taking advantage of these battle-tested patterns, and of the libraries that implement them, can now be as simple as including a few dependencies in your application build file and applying the appropriate annotation in your source code.

It leverages libraries and services from Spring Cloud and Netflix OSS to compose the system.

https://network.pivotal.io/products/p-spring-cloud-services[Spring Cloud Services] package.

> These services are for deployment in a local dev machine or on Pivotal Web Services on run.pivotal.io

== Building

. Using Maven, build and package the application:
+
----
$ mvn package
----
+
Maven will automatically download all dependencies. This may take a few moments.


== Deploying to Pivotal Cloud Foundry 

. Run `cf push` to create the services that you need:
This will push a Spring Cloud Config Server, a Eureka server, and a Hystrix Dashboard, all with random routes.
+
----
$ cf push -f manifest-services.yml
----


. In the Pivotal Cloud Foundry App Manager console, click on the *Manage* links for the *Config Server*. Once the service is initialized and the web form appears, paste https://github.com/pivotal-anz/cf-SpringBootTrader-config.git into the *Git URI* field and click *Submit*.

. Also click on the *Manage* links for the *Service Registry* and *Circuit Breaker*. Make sure the services are finished initializing before you proceed.

+
. Then create User Provided Services using the URI's created when you pushed the apps:
+
----
cf cups config-service -p '{"uri":"http://config-server-fluxional-suttee.cfapps.io"}'
cf cups service-registry -p '{"uri":"http://eureka-unprevalent-toper.cfapps.io"}'
cf cs elephantsql turtle fortunes-db
----

== Running Locally

. Run the config-server as a Spring Boot 
+
----
$ cd config-server
$ mvn spring-boot:run
----

. Run the eureka server as a Spring Boot 
+
----
$ cd eureka
$ mvn spring-boot:run
----

. Run the eureka server as a Spring Boot 
+
----
$ cd hystrix-dashboard
$ mvn spring-boot:run
----

You could also do
----
`java -jar target/nameOfService.jar` instead of `mvn spring-boot:run`
----
{'fraction_non_alphanumeric': 0.08214130905938448, 'fraction_numerical': 0.0, 'mean_word_length': 4.0, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3715647', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1220, 'n_words': 611}