From d3fbddc9cd566634852ff9e565791e4e6faccea8 Mon Sep 17 00:00:00 2001 From: Scott Frederick Date: Tue, 31 Oct 2017 14:21:18 -0500 Subject: [PATCH] Sync docs from master to gh-pages --- spring-cloud-cloud-foundry-connector.html | 243 +++---- spring-cloud-connectors.html | 291 +++----- spring-cloud-heroku-connector.html | 175 ++--- spring-cloud-spring-service-connector.html | 741 +++++++++++---------- 4 files changed, 615 insertions(+), 835 deletions(-) diff --git a/spring-cloud-cloud-foundry-connector.html b/spring-cloud-cloud-foundry-connector.html index 4182c3a..1655f47 100644 --- a/spring-cloud-cloud-foundry-connector.html +++ b/spring-cloud-cloud-foundry-connector.html @@ -4,13 +4,13 @@ - + Spring Cloud Cloud Foundry Connector - + - - +
+

Cassandra

+
+

The connector will check for:

+
+
+
    +
  • +

    cqlsh_port and node_ips fields in credentials

    +
  • +
+
+
+

DB2

The connector will check for:

@@ -661,10 +588,10 @@ table.CodeRay td.code>pre{padding:0}

label beginning with the sqldb, dashDB, or db2 tags

  • -

    uri or uris using the scheme db2

    +

    uri using the scheme db2

  • -

    jdbcUrl field in credentials using the scheme db2

    +

    jdbcUrl using the subprotocol db2 in the JDBC URL

  • db2Uri, db2uri, db2Url, or db2url fields in credentials

    @@ -686,7 +613,7 @@ table.CodeRay td.code>pre{padding:0}

    label beginning with the mongodb tag

  • -

    uri or uris using the scheme mongodb

    +

    uri using the scheme mongodb

  • mongodbUri, mongodburi, mongodbUrl, or mongodburl fields in credentials

    @@ -708,10 +635,10 @@ table.CodeRay td.code>pre{padding:0}

    label beginning with the mysql tag

  • -

    uri or uris using the scheme mysql

    +

    uri using the scheme mysql

  • -

    jdbcUrl field in credentials using the scheme mysql

    +

    jdbcUrl using the subprotocol mysql in the JDBC URL

  • mysqlUri, mysqluri, mysqlUrl, or mysqlurl fields in credentials

    @@ -727,10 +654,10 @@ table.CodeRay td.code>pre{padding:0}
    • -

      uri or uris using the scheme oracle

      +

      uri using the scheme oracle

    • -

      jdbcUrl field in credentials using the scheme oracle

      +

      jdbcUrl using the subprotocol oracle in the JDBC URL

    • oracleUri, oracleuri, oracleUrl, or oracleurl fields in credentials

      @@ -752,10 +679,10 @@ table.CodeRay td.code>pre{padding:0}

      label beginning with the postgresql tag

    • -

      uri or uris using the scheme postgres

      +

      uri using the scheme postgres

    • -

      jdbcUrl field in credentials using the scheme postgres

      +

      jdbcUrl using the subprotocol postgres in the JDBC URL

    • postgresUri, postgresuri, postgresUrl, or postgresurl fields in credentials

      @@ -799,7 +726,7 @@ table.CodeRay td.code>pre{padding:0}

      label beginning with the redis tag

    • -

      uri or uris using the scheme redis

      +

      uri using the scheme redis

    • redisUri, redisuri, redisUrl, or redisurl fields in credentials

      @@ -821,7 +748,7 @@ table.CodeRay td.code>pre{padding:0}

      label beginning with the smtp tag

    • -

      uri or uris using the scheme smtp

      +

      uri using the scheme smtp

    • smtpUri, smtpuri, smtpUrl, or smtpurl fields in credentials

      @@ -837,10 +764,10 @@ table.CodeRay td.code>pre{padding:0}
      • -

        uri or uris using the scheme sqlserver

        +

        uri using the scheme sqlserver

      • -

        jdbcUrl field in credentials using the scheme sqlserver

        +

        jdbcUrl using the subprotocol sqlserver in the JDBC URL

      • sqlserverUri, sqlserveruri, sqlserverUrl, or sqlserverurl fields in credentials

        @@ -854,7 +781,7 @@ table.CodeRay td.code>pre{padding:0}
      diff --git a/spring-cloud-connectors.html b/spring-cloud-connectors.html index 32d309f..477ec61 100644 --- a/spring-cloud-connectors.html +++ b/spring-cloud-connectors.html @@ -4,13 +4,13 @@ - + Spring Cloud Connectors - + - - +
    • @@ -767,7 +684,7 @@ table.CodeRay td.code>pre{padding:0}

      Obtain the Cloud object for the environment in which the application is running.

      -
      Cloud cloud = cloudFactory.getCloud();
      +
      Cloud cloud = cloudFactory.getCloud();
      @@ -778,22 +695,22 @@ table.CodeRay td.code>pre{padding:0}

      Use the Cloud instance to access application and service information and to create service connectors.

      -
      // ServiceInfo has all the information necessary to connect to the underlying service
      -List<ServiceInfo> serviceInfos = cloud.getServiceInfos();
      +
      // ServiceInfo has all the information necessary to connect to the underlying service
      +List<ServiceInfo> serviceInfos = cloud.getServiceInfos();
      -
      // Find the `ServiceInfo` definitions suitable for connecting to a particular service type
      -List<ServiceInfo> databaseInfos = cloud.getServiceInfos(DataSource.class);
      +
      // Find the `ServiceInfo` definitions suitable for connecting to a particular service type
      +List<ServiceInfo> databaseInfos = cloud.getServiceInfos(DataSource.class);
      -
      // Alternatively, let Spring Cloud Connectors create a service connector for you
      -String serviceId = "inventory-db";
      -DataSource ds = cloud.getServiceConnector(serviceId, DataSource.class,
      -                                            null /* default config */);
      +
      // Alternatively, let Spring Cloud Connectors create a service connector for you
      +String serviceId = "inventory-db";
      +DataSource ds = cloud.getServiceConnector(serviceId, DataSource.class,
      +                                            null /* default config */);
      @@ -806,7 +723,7 @@ table.CodeRay td.code>pre{padding:0}

      Spring Service Connector

      -

      The Spring Service Connector creates service connection objects for Spring applications. It allows for Java or XML configuration of connection beans and currently supports relational databases such as MySQL and PostgreSQL via javax.sql.DataSource, SMTP via org.springframework.mail.MailSender, RabbitMQ via Spring AMQP, and MongoDB and Redis via Spring Data projects. It also provides support for connecting to generic (e.g., private) services.

      +

      The Spring Service Connector creates service connection objects for Spring applications. It allows for Java or XML configuration of connection beans and currently supports relational databases such as MySQL and PostgreSQL via javax.sql.DataSource; SMTP via org.springframework.mail.MailSender; RabbitMQ via Spring AMQP; and MongoDB, Redis, and Cassandra via Spring Data projects. It also provides support for connecting to generic (e.g., private) services.

      For details on this service connector, see Spring Cloud Spring Service Connector.

      @@ -817,7 +734,7 @@ table.CodeRay td.code>pre{padding:0}

      Cloud Foundry Connector

      -

      The Cloud Foundry Connector discovers services bound to an application running in a Cloud Foundry environment. As it consumes bound service information in Cloud Foundry’s standard format, it is provider-agnostic; it currently is aware of application monitoring, DB2, MongoDB, MySQL, Oracle, PostgreSQL, RabbitMQ, Redis, SMTP, and SQL Server services.

      +

      The Cloud Foundry Connector discovers services bound to an application running in a Cloud Foundry environment. As it consumes bound service information in Cloud Foundry’s standard format, it is provider-agnostic; it currently is aware of application monitoring, Cassandra, DB2, MongoDB, MySQL, Oracle, PostgreSQL, RabbitMQ, Redis, SMTP, and SQL Server services.

      For details on this cloud connector, see Spring Cloud Cloud Foundry Connector.

      @@ -828,7 +745,7 @@ table.CodeRay td.code>pre{padding:0}

      Heroku Connector

      -

      The Heroku Connector discovers services bound to an application running in Heroku. It currently is aware of PostgreSQL (provided by Heroku), MySQL (provided by ClearDB), Redis (provided by Redis To Go, Redis Cloud, RedisGreen, openredis, and Heroku), MongoDB (provided by mLab, MongoHQ, and MongoSoup), and RabbitMQ (provided by CloudAMQP). It can be extended to support additional providers for these services.

      +

      The Heroku Connector discovers services bound to an application running in Heroku. It currently is aware of PostgreSQL (provided by Heroku), MySQL (provided by ClearDB), Redis (provided by Redis To Go, Redis Cloud, RedisGreen, openredis, and Heroku), MongoDB (provided by MongoLab, MongoHQ, and MongoSoup), and RabbitMQ (provided by CloudAMQP). It can be extended to support additional providers for these services.

      For details on this cloud connector, see Spring Cloud Heroku Connector.

      @@ -848,7 +765,7 @@ table.CodeRay td.code>pre{padding:0}
      -
      java -Dspring.cloud.database='mysql://user:pass@host:1234/dbname' -jar my-app.jar
      +
      java -Dspring.cloud.database='mysql://user:pass@host:1234/dbname' -jar my-app.jar
      @@ -856,7 +773,7 @@ table.CodeRay td.code>pre{padding:0}
      -
      java -Dspring.cloud.propertiesFile=/path/to/spring-cloud.properties -jar my-app.jar
      +
      java -Dspring.cloud.propertiesFile=/path/to/spring-cloud.properties -jar my-app.jar
      @@ -864,7 +781,7 @@ table.CodeRay td.code>pre{padding:0}
      -
      spring.cloud.propertiesFile: ${user.home}/.config/myApp/spring-cloud.properties
      +
      spring.cloud.propertiesFile: ${user.home}/.config/myApp/spring-cloud.properties
      @@ -872,7 +789,7 @@ table.CodeRay td.code>pre{padding:0}
      -
      spring.cloud.appId:    myApp
      +
      spring.cloud.appId:    myApp
       ; spring.cloud.{id}:   URI
       spring.cloud.database: mysql://user:pass@host:1234/dbname
      @@ -1038,17 +955,17 @@ spring.cloud.database: mysql://user:pass@host:1234/dbname
      -
      public class HelloWorldServiceInfo extends UriBasedServiceInfo {
      -    public static final String URI_SCHEME = "helloworld";
      +
      public class HelloWorldServiceInfo extends UriBasedServiceInfo {
      +    public static final String URI_SCHEME = "helloworld";
       
      -  // Needed to support structured service definitions such as Cloud Foundry's
      -    public HelloWorldServiceInfo(String id, String host, int port, String username, String password, String greeting) {
      -    super(id, URI_SCHEME, host, port, username, password, greeting);
      +  // Needed to support structured service definitions such as Cloud Foundry's
      +    public HelloWorldServiceInfo(String id, String host, int port, String username, String password, String greeting) {
      +    super(id, URI_SCHEME, host, port, username, password, greeting);
           }
       
      -    // Needed to support URI-based service definitions such as Heroku's
      -    public HelloWorldServiceInfo(String id, String uri) {
      -        super(id, uri);
      +    // Needed to support URI-based service definitions such as Heroku's
      +    public HelloWorldServiceInfo(String id, String uri) {
      +        super(id, uri);
           }
       }
      @@ -1081,9 +998,9 @@ spring.cloud.database: mysql://user:pass@host:1234/dbname
      -
      @Override
      -public HelloWorldServiceInfo createServiceInfo(String id, String uri) {
      -  return new HelloWorldServiceInfo(id, uri);
      +
      @Override
      +public HelloWorldServiceInfo createServiceInfo(String id, String uri) {
      +  return new HelloWorldServiceInfo(id, uri);
       }
      @@ -1158,7 +1075,7 @@ spring.cloud.database: mysql://user:pass@host:1234/dbname
      diff --git a/spring-cloud-heroku-connector.html b/spring-cloud-heroku-connector.html index 8cb62c8..f9743f4 100644 --- a/spring-cloud-heroku-connector.html +++ b/spring-cloud-heroku-connector.html @@ -4,13 +4,13 @@ - + Spring Cloud Heroku Connector - + - - +
  • @@ -531,6 +449,7 @@ table.CodeRay td.code>pre{padding:0}
  • Relational database (DB2, MySQL, Oracle, PostgreSQL, SQL Server)
  • MongoDB
  • Redis
  • +
  • Cassandra
  • Connecting to Generic Services
  • @@ -582,9 +501,9 @@ table.CodeRay td.code>pre{padding:0}
    -
    @Bean
    -public Cloud cloud() {
    -  return new CloudFactory().getCloud();
    +
    @Bean
    +public Cloud cloud() {
    +  return new CloudFactory().getCloud();
     }
    @@ -593,10 +512,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    @Bean
    -@ConfigurationProperties(DataSourceProperties.PREFIX)
    -public DataSource dataSource() {
    -  return cloud().getSingletonServiceConnector(DataSource.class, null);
    +
    @Bean
    +@ConfigurationProperties(DataSourceProperties.PREFIX)
    +public DataSource dataSource() {
    +  return cloud().getSingletonServiceConnector(DataSource.class, null);
     }
    @@ -619,18 +538,18 @@ table.CodeRay td.code>pre{padding:0}
    -
    class CloudConfig extends AbstractCloudConfig {
    -    @Bean
    -        public DataSource inventoryDataSource() {
    -            return connectionFactory().dataSource();
    +
    class CloudConfig extends AbstractCloudConfig {
    +    @Bean
    +        public DataSource inventoryDataSource() {
    +            return connectionFactory().dataSource();
             }
     
    -    @Bean
    -    public MongoDbFactory documentMongoDbFactory() {
    -        return connectionFactory().mongoDbFactory();
    +    @Bean
    +    public MongoDbFactory documentMongoDbFactory() {
    +        return connectionFactory().mongoDbFactory();
         }
     
    -    // (More beans to obtain service connectors)
    +    // (More beans to obtain service connectors)
     }
    @@ -639,7 +558,7 @@ table.CodeRay td.code>pre{padding:0}
    -
    @Bean("inventory-service")
    +
    @Bean("inventory-service")
    @@ -650,18 +569,18 @@ table.CodeRay td.code>pre{padding:0}
    -
    class CloudConfig extends AbstractCloudConfig {
    -    @Bean
    -    public DataSource inventoryDataSource() {
    -        return connectionFactory().dataSource("inventory-db-service");
    +
    class CloudConfig extends AbstractCloudConfig {
    +    @Bean
    +    public DataSource inventoryDataSource() {
    +        return connectionFactory().dataSource("inventory-db-service");
         }
     
    -    @Bean
    -    public MongoDbFactory documentMongoDbFactory() {
    -        return connectionFactory().mongoDbFactory("document-service");
    +    @Bean
    +    public MongoDbFactory documentMongoDbFactory() {
    +        return connectionFactory().mongoDbFactory("document-service");
         }
     
    -    // (More beans to obtain service connectors)
    +    // (More beans to obtain service connectors)
     }
    @@ -675,10 +594,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the only available RabbitMQ service
    -@Bean
    -public RabbitConnectionFactory rabbitFactory() {
    -    return connectionFactory().rabbitConnectionFactory();
    +
    //Connect to the only available RabbitMQ service
    +@Bean
    +public RabbitConnectionFactory rabbitFactory() {
    +    return connectionFactory().rabbitConnectionFactory();
     }
    @@ -687,10 +606,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the 'bunnymq' RabbitMQ service
    -@Bean
    -public RabbitConnectionFactory rabbitFactory() {
    -    return connectionFactory().rabbitConnectionFactory("bunnymq");
    +
    //Connect to the 'bunnymq' RabbitMQ service
    +@Bean
    +public RabbitConnectionFactory rabbitFactory() {
    +    return connectionFactory().rabbitConnectionFactory("bunnymq");
     }
    @@ -699,11 +618,11 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the 'bunnymq' RabbitMQ service, supplying configuration
    -@Bean
    -public RabbitConnectionFactory rabbitFactory() {
    -    RabbitConnectionFactoryConfig rabbitConfig = new RabbitConnectionFactoryConfig(10);
    -    return connectionFactory().rabbitConnectionFactory("bunnymq", rabbitConfig);
    +
    //Connect to the 'bunnymq' RabbitMQ service, supplying configuration
    +@Bean
    +public RabbitConnectionFactory rabbitFactory() {
    +    RabbitConnectionFactoryConfig rabbitConfig = new RabbitConnectionFactoryConfig(10);
    +    return connectionFactory().rabbitConnectionFactory("bunnymq", rabbitConfig);
     }
    @@ -712,15 +631,15 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the 'bunnymq' RabbitMQ service, setting properties
    -@Bean
    -public RabbitConnectionFactory rabbitFactory() {
    -    Map<String, Object> properties = new HashMap<String, Object>();
    -    properties.put("requestedHeartbeat", 5);
    -    properties.put("connectionTimeout", 10);
    +
    //Connect to the 'bunnymq' RabbitMQ service, setting properties
    +@Bean
    +public RabbitConnectionFactory rabbitFactory() {
    +    Map<String, Object> properties = new HashMap<String, Object>();
    +    properties.put("requestedHeartbeat", 5);
    +    properties.put("connectionTimeout", 10);
     
    -    RabbitConnectionFactoryConfig rabbitConfig = new RabbitConnectionFactoryConfig(properties);
    -    return connectionFactory().rabbitConnectionFactory("bunnymq", rabbitConfig);
    +    RabbitConnectionFactoryConfig rabbitConfig = new RabbitConnectionFactoryConfig(properties);
    +    return connectionFactory().rabbitConnectionFactory("bunnymq", rabbitConfig);
     }
    @@ -746,10 +665,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the only available relational database service
    -@Bean
    -public DataSource dataSource() {
    -    return connectionFactory().dataSource();
    +
    //Connect to the only available relational database service
    +@Bean
    +public DataSource dataSource() {
    +    return connectionFactory().dataSource();
     }
    @@ -758,10 +677,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the 'my-own-personal-sql' relational database service
    -@Bean
    -public DataSource dataSource() {
    -    return connectionFactory().dataSource("my-own-personal-sql");
    +
    //Connect to the 'my-own-personal-sql' relational database service
    +@Bean
    +public DataSource dataSource() {
    +    return connectionFactory().dataSource("my-own-personal-sql");
     }
    @@ -770,12 +689,12 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the 'my-own-personal-sql' relational database service, supplying configuration
    -@Bean
    -public DataSource dataSource() {
    -    PoolConfig poolConfig = new PoolConfig(5, 30, 3000);
    -    DataSourceConfig dbConfig = new DataSourceConfig(poolConfig, null);
    -    return connectionFactory().dataSource("my-own-personal-sql", dbConfig);
    +
    //Connect to the 'my-own-personal-sql' relational database service, supplying configuration
    +@Bean
    +public DataSource dataSource() {
    +    PoolConfig poolConfig = new PoolConfig(5, 30, 3000);
    +    DataSourceConfig dbConfig = new DataSourceConfig(poolConfig, null);
    +    return connectionFactory().dataSource("my-own-personal-sql", dbConfig);
     }
    @@ -784,13 +703,13 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the 'my-own-personal-sql' relational database service, setting properties
    -@Bean
    -public DataSource dataSource() {
    -    PoolConfig poolConfig = new PoolConfig(5, 30, 3000);
    -    ConnectionConfig connConfig = new ConnectionConfig("useUnicode=yes;characterEncoding=UTF-8");
    -    DataSourceConfig dbConfig = new DataSourceConfig(poolConfig, connConfig);
    -    return connectionFactory().dataSource("my-own-personal-sql", dbConfig);
    +
    //Connect to the 'my-own-personal-sql' relational database service, setting properties
    +@Bean
    +public DataSource dataSource() {
    +    PoolConfig poolConfig = new PoolConfig(5, 30, 3000);
    +    ConnectionConfig connConfig = new ConnectionConfig("useUnicode=yes;characterEncoding=UTF-8");
    +    DataSourceConfig dbConfig = new DataSourceConfig(poolConfig, connConfig);
    +    return connectionFactory().dataSource("my-own-personal-sql", dbConfig);
     }
    @@ -842,12 +761,12 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Set order of DataSource implementations, using a List of full class names
    -@Bean
    -public DataSource dataSource() {
    -    List<String> dataSourceNames = Arrays.asList("TomcatJdbcPooledDataSourceCreator", "HikariCpPooledDataSourceCreator", "BasicDbcpPooledDataSourceCreator");
    -    DataSourceConfig dbConfig = new DataSourceConfig(dataSourceNames);
    -    return connectionFactory().dataSource("my-own-personal-sql", dbConfig);
    +
    //Set order of DataSource implementations, using a List of full class names
    +@Bean
    +public DataSource dataSource() {
    +    List<String> dataSourceNames = Arrays.asList("TomcatJdbcPooledDataSourceCreator", "HikariCpPooledDataSourceCreator", "BasicDbcpPooledDataSourceCreator");
    +    DataSourceConfig dbConfig = new DataSourceConfig(dataSourceNames);
    +    return connectionFactory().dataSource("my-own-personal-sql", dbConfig);
     }
    @@ -856,12 +775,12 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Set order of DataSource implementations, using a List of strings contained in class names
    -@Bean
    -public DataSource dataSource() {
    -    List<String> dataSourceNames = Arrays.asList("TomcatJdbc", "HikariCp", "BasicDbcp");
    -    DataSourceConfig dbConfig = new DataSourceConfig(dataSourceNames);
    -    return connectionFactory().dataSource("my-own-personal-sql", dbConfig);
    +
    //Set order of DataSource implementations, using a List of strings contained in class names
    +@Bean
    +public DataSource dataSource() {
    +    List<String> dataSourceNames = Arrays.asList("TomcatJdbc", "HikariCp", "BasicDbcp");
    +    DataSourceConfig dbConfig = new DataSourceConfig(dataSourceNames);
    +    return connectionFactory().dataSource("my-own-personal-sql", dbConfig);
     }
    @@ -875,10 +794,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the only available MongoDB service
    -@Bean
    -public MongoDbFactory mongoFactory() {
    -    return connectionFactory().mongoDbFactory();
    +
    //Connect to the only available MongoDB service
    +@Bean
    +public MongoDbFactory mongoFactory() {
    +    return connectionFactory().mongoDbFactory();
     }
    @@ -887,11 +806,11 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the only available MongoDB service, supplying configuration
    -@Bean
    -public MongoDbFactory mongoFactory() {
    -    MongoDbFactoryConfig mongoConfig = new MongoDbFactoryConfig("NONE", 50, 200);
    -    return connectionFactory().mongoDbFactory(mongoConfig);
    +
    //Connect to the only available MongoDB service, supplying configuration
    +@Bean
    +public MongoDbFactory mongoFactory() {
    +    MongoDbFactoryConfig mongoConfig = new MongoDbFactoryConfig("NONE", 50, 200);
    +    return connectionFactory().mongoDbFactory(mongoConfig);
     }
    @@ -900,10 +819,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the 'mongo-service' MongoDB service
    -@Bean
    -public MongoDbFactory mongoFactory() {
    -    return connectionFactory().mongoDbFactory("mongo-service");
    +
    //Connect to the 'mongo-service' MongoDB service
    +@Bean
    +public MongoDbFactory mongoFactory() {
    +    return connectionFactory().mongoDbFactory("mongo-service");
     }
    @@ -912,11 +831,11 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the only available MongoDB service, supplying configuration
    -@Bean
    -public MongoDbFactory mongoFactory() {
    -    MongoDbFactoryConfig mongoConfig = new MongoDbFactoryConfig("NONE", 50, 200);
    -    return connectionFactory().mongoDbFactory("mongo-service", mongoConfig);
    +
    //Connect to the 'mongo-service' MongoDB service, supplying configuration
    +@Bean
    +public MongoDbFactory mongoFactory() {
    +    MongoDbFactoryConfig mongoConfig = new MongoDbFactoryConfig("NONE", 50, 200);
    +    return connectionFactory().mongoDbFactory("mongo-service", mongoConfig);
     }
    @@ -928,10 +847,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the only available Redis service
    -@Bean
    -public RedisConnectionFactory redisFactory() {
    -    return connectionFactory().redisConnectionFactory();
    +
    //Connect to the only available Redis service
    +@Bean
    +public RedisConnectionFactory redisFactory() {
    +    return connectionFactory().redisConnectionFactory();
     }
    @@ -940,12 +859,12 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the only available Redis service, supplying configuration
    -@Bean
    -public RedisConnectionFactory redisFactory() {
    -    PoolConfig poolConfig = new PoolConfig(5, 30, 3000);
    -    PooledServiceConnectorConfig redisConfig = new PooledServiceConnectorConfig(poolConfig);
    -    return connectionFactory().redisConnectionFactory(redisConfig);
    +
    //Connect to the only available Redis service, supplying configuration
    +@Bean
    +public RedisConnectionFactory redisFactory() {
    +    PoolConfig poolConfig = new PoolConfig(5, 30, 3000);
    +    PooledServiceConnectorConfig redisConfig = new PooledServiceConnectorConfig(poolConfig);
    +    return connectionFactory().redisConnectionFactory(redisConfig);
     }
    @@ -954,10 +873,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the 'redis-service' Redis service
    -@Bean
    -public RedisConnectionFactory redisFactory() {
    -    return connectionFactory().redisConnectionFactory("redis-service");
    +
    //Connect to the 'redis-service' Redis service
    +@Bean
    +public RedisConnectionFactory redisFactory() {
    +    return connectionFactory().redisConnectionFactory("redis-service");
     }
    @@ -966,12 +885,12 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the 'redis-service' Redis service, supplying configuration
    -@Bean
    -public RedisConnectionFactory redisFactory() {
    -  PoolConfig poolConfig = new PoolConfig(5, 30, 3000);
    -  PooledServiceConnectorConfig redisConfig = new RedisConnectionFactoryConfig(poolConfig);
    -  return connectionFactory().redisConnectionFactory("redis-service", redisConfig);
    +
    //Connect to the 'redis-service' Redis service, supplying configuration
    +@Bean
    +public RedisConnectionFactory redisFactory() {
    +  PoolConfig poolConfig = new PoolConfig(5, 30, 3000);
    +  PooledServiceConnectorConfig redisConfig = new RedisConnectionFactoryConfig(poolConfig);
    +  return connectionFactory().redisConnectionFactory("redis-service", redisConfig);
     }
    @@ -980,13 +899,13 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the 'redis-service' Redis service, setting a property
    -@Bean
    -public RedisConnectionFactory redisFactory() {
    -  Map<String, Object> properties = new HashMap<String, Object>();
    -  properties.put("timeout", 10);
    -  RedisConnectionFactoryConfig redisConfig = new RedisConnectionFactoryConfig(properties);
    -  return connectionFactory().redisConnectionFactory("redis-service", redisConfig);
    +
    //Connect to the 'redis-service' Redis service, setting a property
    +@Bean
    +public RedisConnectionFactory redisFactory() {
    +  Map<String, Object> properties = new HashMap<String, Object>();
    +  properties.put("timeout", 10);
    +  RedisConnectionFactoryConfig redisConfig = new RedisConnectionFactoryConfig(properties);
    +  return connectionFactory().redisConnectionFactory("redis-service", redisConfig);
     }
    @@ -995,14 +914,71 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the 'redis-service' Redis service, providing configuration and setting a property
    -@Bean
    -public RedisConnectionFactory redisFactory() {
    -  Map<String, Object> properties = new HashMap<String, Object>();
    -  properties.put("timeout", 10);
    -  PoolConfig poolConfig = new PoolConfig(5, 30, 3000);
    -  RedisConnectionFactoryConfig redisConfig = new RedisConnectionFactoryConfig(poolConfig, properties);
    -  return connectionFactory().redisConnectionFactory("redis-service", redisConfig);
    +
    //Connect to the 'redis-service' Redis service, providing configuration and setting a property
    +@Bean
    +public RedisConnectionFactory redisFactory() {
    +  Map<String, Object> properties = new HashMap<String, Object>();
    +  properties.put("timeout", 10);
    +  PoolConfig poolConfig = new PoolConfig(5, 30, 3000);
    +  RedisConnectionFactoryConfig redisConfig = new RedisConnectionFactoryConfig(poolConfig, properties);
    +  return connectionFactory().redisConnectionFactory("redis-service", redisConfig);
    +}
    +
    +
    + +
    +

    Cassandra

    +
    +

    To connect to a unique Cassandra service, you can create a service bean using cluster(). The following example connects to the only Cassandra service bound to the application.

    +
    +
    +
    +
    //Connect to the only available Cassandra service
    +@Bean
    +public Cluster cluster() {
    +    return connectionFactory().cluster();
    +}
    +
    +
    +
    +

    To provide configuration for a unique Cassandra service, you can use an overloaded cluster() variant. The following example connects to the only Cassandra service bound to the application and supplies configuration using a CassandraClusterConfig with metrics and JMX reporting disabled.

    +
    +
    +
    +
    //Connect to the only available Cassandra service, supplying configuration
    +@Bean
    +public Cluster cluster() {
    +    CassandraClusterConfig config = new CassandraClusterConfig();
    +    config.setMetricsEnabled(false);
    +    config.setJmxReportingEnabled(false);
    +    return connectionFactory().cluster(config);
    +}
    +
    +
    +
    +

    To connect to a specific Cassandra service, you can use an overloaded variant of cluster(). The following example connects specifically to the cassandra-service Cassandra service.

    +
    +
    +
    +
    //Connect to the 'cassandra-service' Cassandra service
    +@Bean
    +public Cluster cluster() {
    +    return connectionFactory().cluster("cassandra-service");
    +}
    +
    +
    +
    +

    To connect to a specific Cassandra service and provide configuration, you can use an overloaded cluster() variant. The following example connects to the cassandra-service Cassandra service and supplies configuration using a CassandraClusterConfig with metrics and JMX reporting disabled.

    +
    +
    +
    +
    //Connect to the 'cassandra-service' Cassandra service, supplying configuration
    +@Bean
    +public Cluster cluster() {
    +    CassandraClusterConfig config = new CassandraClusterConfig();
    +    config.setMetricsEnabled(false);
    +    config.setJmxReportingEnabled(false);
    +    return connectionFactory().cluster("cassandra-service", config);
     }
    @@ -1014,10 +990,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the only available SMTP service
    -@Bean
    -public MailSender mailSender() {
    -    return connectionFactory().service(MailSender.class);
    +
    //Connect to the only available SMTP service
    +@Bean
    +public MailSender mailSender() {
    +    return connectionFactory().service(MailSender.class);
     }
    @@ -1026,10 +1002,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    //Connect to the 'mail-service' SMTP service
    -@Bean
    -public MailSender mailSender() {
    -    return connectionFactory().service("mail-service", MailSender.class);
    +
    //Connect to the 'mail-service' SMTP service
    +@Bean
    +public MailSender mailSender() {
    +    return connectionFactory().service("mail-service", MailSender.class);
     }
    @@ -1042,9 +1018,9 @@ table.CodeRay td.code>pre{padding:0}
    -
    @Bean
    -public Search search() {
    -  return connectionFactory().service("search-service", Search.class);
    +
    @Bean
    +public Search search() {
    +  return connectionFactory().service("search-service", Search.class);
     }
    @@ -1056,9 +1032,9 @@ table.CodeRay td.code>pre{padding:0}
    -
    @Configuration
    -@ServiceScan
    -class CloudConfig {
    +
    @Configuration
    +@ServiceScan
    +class CloudConfig {
     }
    @@ -1070,7 +1046,7 @@ table.CodeRay td.code>pre{padding:0}
    -
    @Autowired DataSource inventoryDb;
    +
    @Autowired DataSource inventoryDb;
    @@ -1078,8 +1054,8 @@ table.CodeRay td.code>pre{padding:0}
    -
    @Autowired @Qualifier("inventory-db") DataSource inventoryDb;
    -@Autowired @Qualifier("shipping-db") DataSource shippingDb;
    +
    @Autowired @Qualifier("inventory-db") DataSource inventoryDb;
    +@Autowired @Qualifier("shipping-db") DataSource shippingDb;
    @@ -1090,10 +1066,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    class CloudPropertiesConfig extends AbstractCloudConfig {
    -    @Bean
    -    public Properties cloudProperties() {
    -        return properties();
    +
    class CloudPropertiesConfig extends AbstractCloudConfig {
    +    @Bean
    +    public Properties cloudProperties() {
    +        return properties();
         }
     }
    @@ -1114,14 +1090,14 @@ table.CodeRay td.code>pre{padding:0}
    -
    <?xml version="1.0" encoding="UTF-8"?>
    -<beans xmlns="http://www.springframework.org/schema/beans"
    -           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    -       xmlns:cloud="http://www.springframework.org/schema/cloud"
    -       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    -       http://www.springframework.org/schema/cloud http://www.springframework.org/schema/cloud/spring-cloud.xsd">
    +
    <?xml version="1.0" encoding="UTF-8"?>
    +<beans xmlns="http://www.springframework.org/schema/beans"
    +           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +       xmlns:cloud="http://www.springframework.org/schema/cloud"
    +       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    +       http://www.springframework.org/schema/cloud http://www.springframework.org/schema/cloud/spring-cloud.xsd">
     
    -<!-- <cloud> namespace usage here -->
    +<!-- <cloud> namespace usage here -->
    @@ -1132,10 +1108,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    <cloud:data-source id="inventory-db" service-name="inventory-db-service">
    -    <cloud:connection properties="sessionVariables=sql_mode='ANSI';characterEncoding=UTF-8"/>
    -    <cloud:pool pool-size="20" max-wait-time="200"/>
    -</cloud>
    +
    <cloud:data-source id="inventory-db" service-name="inventory-db-service">
    +    <cloud:connection properties="sessionVariables=sql_mode='ANSI';characterEncoding=UTF-8"/>
    +    <cloud:pool pool-size="20" max-wait-time="200"/>
    +</cloud>
    @@ -1149,9 +1125,9 @@ table.CodeRay td.code>pre{padding:0}
    -
    <cloud:mongo-db-factory/>
    -<cloud:redis-connection-factory/>
    -<cloud:rabbit-connection-factory/>
    +
    <cloud:mongo-db-factory/>
    +<cloud:redis-connection-factory/>
    +<cloud:rabbit-connection-factory/>
    @@ -1164,8 +1140,8 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the only available RabbitMQ service -->
    -<cloud:rabbit-connection-factory />
    +
    <!-- Connect to the only available RabbitMQ service -->
    +<cloud:rabbit-connection-factory />
    @@ -1173,8 +1149,8 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'bunnymq' RabbitMQ service -->
    -<cloud:rabbit-connection-factory service-name="bunnymq" />
    +
    <!-- Connect to the 'bunnymq' RabbitMQ service -->
    +<cloud:rabbit-connection-factory service-name="bunnymq" />
    @@ -1182,8 +1158,8 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'bunnymq' RabbitMQ service with a bean of id 'rabbitmq' -->
    -<cloud:rabbit-connection-factory id="rabbitmq" service-name="bunnymq" />
    +
    <!-- Connect to the 'bunnymq' RabbitMQ service with a bean of id 'rabbitmq' -->
    +<cloud:rabbit-connection-factory id="rabbitmq" service-name="bunnymq" />
    @@ -1191,10 +1167,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'bunnymq' RabbitMQ service with a bean of id 'rabbitmq', setting channel cache size -->
    -<cloud:rabbit-connection-factory id="rabbitmq" service-name="bunnymq">
    -  <cloud:rabbit-options channel-cache-size="200"/>
    -</cloud:rabbit-connection-factory>
    +
    <!-- Connect to the 'bunnymq' RabbitMQ service with a bean of id 'rabbitmq', setting channel cache size -->
    +<cloud:rabbit-connection-factory id="rabbitmq" service-name="bunnymq">
    +  <cloud:rabbit-options channel-cache-size="200"/>
    +</cloud:rabbit-connection-factory>
    @@ -1202,14 +1178,14 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'bunnymq' RabbitMQ service with a bean of id 'rabbitmq', setting channel cache size and connection properties -->
    -<cloud:rabbit-connection-factory id="rabbitmq" service-name="bunnymq">
    -  <cloud:rabbit-options channel-cache-size="200"/>
    -  <cloud:connection-properties>
    -    <entry key="requestedHeartbeat" value="5"/>
    -    <entry key="connectionTimeout" value="10"/>
    -  </cloud:connection-properties>
    -</cloud:rabbit-connection-factory>
    +
    <!-- Connect to the 'bunnymq' RabbitMQ service with a bean of id 'rabbitmq', setting channel cache size and connection properties -->
    +<cloud:rabbit-connection-factory id="rabbitmq" service-name="bunnymq">
    +  <cloud:rabbit-options channel-cache-size="200"/>
    +  <cloud:connection-properties>
    +    <entry key="requestedHeartbeat" value="5"/>
    +    <entry key="connectionTimeout" value="10"/>
    +  </cloud:connection-properties>
    +</cloud:rabbit-connection-factory>
    @@ -1234,8 +1210,8 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the only available relational database service -->
    -<cloud:data-source/>
    +
    <!-- Connect to the only available relational database service -->
    +<cloud:data-source/>
    @@ -1243,8 +1219,8 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'my-own-personal-sql' relational database service -->
    -<cloud:data-source service-name="my-own-personal-sql"/>
    +
    <!-- Connect to the 'my-own-personal-sql' relational database service -->
    +<cloud:data-source service-name="my-own-personal-sql"/>
    @@ -1252,8 +1228,8 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'my-own-personal-sql' relational database service, with a bean of id 'mysql' -->
    -<cloud:data-source id="mysql" service-name="my-own-personal-sql" />
    +
    <!-- Connect to the 'my-own-personal-sql' relational database service, with a bean of id 'mysql' -->
    +<cloud:data-source id="mysql" service-name="my-own-personal-sql" />
    @@ -1261,10 +1237,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'my-own-personal-sql' relational database service with a bean of id 'mysql', setting connection properties -->
    -<cloud:data-source id="mysql" service-name="my-own-personal-sql">
    -    <cloud:connection properties="useUnicode=yes;characterEncoding=UTF-8"/>
    -</cloud:data-source>
    +
    <!-- Connect to the 'my-own-personal-sql' relational database service with a bean of id 'mysql', setting connection properties -->
    +<cloud:data-source id="mysql" service-name="my-own-personal-sql">
    +    <cloud:connection properties="useUnicode=yes;characterEncoding=UTF-8"/>
    +</cloud:data-source>
    @@ -1272,10 +1248,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'my-own-personal-sql' relational database service with a bean of id 'mysql', configuring pool settings -->
    -<cloud:data-source id="mysql" service-name="my-own-personal-sql">
    -    <cloud:pool pool-size="5-30" max-wait-time="3000"/>
    -</cloud:data-source>
    +
    <!-- Connect to the 'my-own-personal-sql' relational database service with a bean of id 'mysql', configuring pool settings -->
    +<cloud:data-source id="mysql" service-name="my-own-personal-sql">
    +    <cloud:pool pool-size="5-30" max-wait-time="3000"/>
    +</cloud:data-source>
    @@ -1326,14 +1302,14 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Set order of DataSource implementations, using strings contained in class names -->
    -<cloud:data-source id="mysql" service-name="my-own-personal-sql" />
    -  <cloud:pool-data-sources>
    -    <value>TomcatJdbc</value>
    -    <value>TomcatDbcp</value>
    -    <value>BasicDbcp</value>
    -  </cloud:pool-data-sources>
    -</cloud:data-source>
    +
    <!-- Set order of DataSource implementations, using strings contained in class names -->
    +<cloud:data-source id="mysql" service-name="my-own-personal-sql" />
    +  <cloud:pool-data-sources>
    +    <value>TomcatJdbc</value>
    +    <value>TomcatDbcp</value>
    +    <value>BasicDbcp</value>
    +  </cloud:pool-data-sources>
    +</cloud:data-source>
    @@ -1346,8 +1322,8 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the only available MongoDB service -->
    -<cloud:mongo-db-factory/>
    +
    <!-- Connect to the only available MongoDB service -->
    +<cloud:mongo-db-factory/>
    @@ -1355,8 +1331,8 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'mongo-service' MongoDB service -->
    -<cloud:mongo-db-factory service-name="mongo-service"/>
    +
    <!-- Connect to the 'mongo-service' MongoDB service -->
    +<cloud:mongo-db-factory service-name="mongo-service"/>
    @@ -1364,8 +1340,8 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'mongo-service' MongoDB service with a bean of id 'mongo' -->
    -<cloud:mongo-db-factory id="mongo" service-name="mongo-service"/>
    +
    <!-- Connect to the 'mongo-service' MongoDB service with a bean of id 'mongo' -->
    +<cloud:mongo-db-factory id="mongo" service-name="mongo-service"/>
    @@ -1373,10 +1349,10 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'mongo-service' MongoDB service with a bean of id 'mongo', setting connections per host -->
    -<cloud:mongo-db-factory id="mongo" service-name="mongo-service">
    -    <cloud:mongo-options connections-per-host="50"/>
    -</cloud:mongo-db-factory>
    +
    <!-- Connect to the 'mongo-service' MongoDB service with a bean of id 'mongo', setting connections per host -->
    +<cloud:mongo-db-factory id="mongo" service-name="mongo-service">
    +    <cloud:mongo-options connections-per-host="50"/>
    +</cloud:mongo-db-factory>
    @@ -1387,8 +1363,8 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the only available Redis service -->
    -<cloud:redis-connection-factory/>
    +
    <!-- Connect to the only available Redis service -->
    +<cloud:redis-connection-factory/>
    @@ -1396,8 +1372,8 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'redis-service' Redis service -->
    -<cloud:redis-connection-factory service-name="redis-service"/>
    +
    <!-- Connect to the 'redis-service' Redis service -->
    +<cloud:redis-connection-factory service-name="redis-service"/>
    @@ -1405,8 +1381,8 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'redis-service' Redis service with a bean of id 'redis' -->
    -<cloud:redis-connection-factory id="redis" service-name="redis-service"/>
    +
    <!-- Connect to the 'redis-service' Redis service with a bean of id 'redis' -->
    +<cloud:redis-connection-factory id="redis" service-name="redis-service"/>
    @@ -1414,12 +1390,12 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'redis-service' Redis service with a bean of id 'redis', setting a connection property -->
    -<cloud:redis-connection-factory id="redis" service-name="redis-service">
    -  <cloud:connection-properties>
    -    <entry key="timeout" value="10"/>
    -  </cloud:connection-properties>
    -</cloud:redis-connection-factory>
    +
    <!-- Connect to the 'redis-service' Redis service with a bean of id 'redis', setting a connection property -->
    +<cloud:redis-connection-factory id="redis" service-name="redis-service">
    +  <cloud:connection-properties>
    +    <entry key="timeout" value="10"/>
    +  </cloud:connection-properties>
    +</cloud:redis-connection-factory>
    @@ -1427,10 +1403,53 @@ table.CodeRay td.code>pre{padding:0}
    -
    <!-- Connect to the 'redis-service' Redis service with a bean of id 'redis', configuring pool settings -->
    -<cloud:redis-connection-factory id="redis" service-name="redis-service">
    -  <cloud:pool pool-size="5-30" max-wait-time="3000"/>
    -</cloud:redis-connection-factory>
    +
    <!-- Connect to the 'redis-service' Redis service with a bean of id 'redis', configuring pool settings -->
    +<cloud:redis-connection-factory id="redis" service-name="redis-service">
    +  <cloud:pool pool-size="5-30" max-wait-time="3000"/>
    +</cloud:redis-connection-factory>
    +
    +
    + +
    +

    Cassandra

    +
    +

    To connect to a Cassandra service, you can use the <cloud:cassandra-session-factory/> element. The following example connects to the only Cassandra service bound to the application.

    +
    +
    +
    +
    <!-- Connect to the only available Cassandra service -->
    +<cloud:cassandra-session-factory/>
    +
    +
    +
    +

    To connect to a specific Cassandra service, you can use the service-name attribute. The following example connects specifically to the cassandra-service Cassandra service.

    +
    +
    +
    +
    <!-- Connect to the 'cassandra-service' Cassandra service -->
    +<cloud:cassandra-session-factory service-name="cassandra-service"/>
    +
    +
    +
    +

    To specify an id for the Cassandra connection bean, you can use the id attribute. The following example connects specifically to the cassandra-service Cassandra service with a bean given the id cassandra.

    +
    +
    +
    +
    <!-- Connect to the 'cassandra-service' Cassandra service with a bean of id 'cassandra' -->
    +<cloud:cassandra-session-factory id="cassandra" service-name="cassandra-service"/>
    +
    +
    +
    +

    To set properties on a Cassandra service, you can use the <cloud:cassandra-options> nested element. The following example connects specifically to the cassandra-service Cassandra service with a bean given the id cassandra and uses the <cloud:cassandra-options> element.

    +
    +
    +
    +
    <!-- Connect to the 'cassandra-service' Cassandra service with a bean of id 'cassandra', setting connections options -->
    +<bean id="retryPolicy" class="com.datastax.driver.core.policies.DefaultRetryPolicy"/>
    +
    +<cloud:cassandra-session-factory id="cassandra" service-name="cassandra-service" >
    +  <cloud:cassandra-options compression="NONE" retry-policy="retryPolicy"/>
    +</cloud:cassandra-session-factory>
    @@ -1442,7 +1461,7 @@ table.CodeRay td.code>pre{padding:0}
    -
     <cloud:service id="email" service-name="email-service" connector-type="com.something.EmailConnectory" />
    +
     <cloud:service id="email" service-name="email-service" connector-type="com.something.EmailConnectory" />
    @@ -1459,7 +1478,7 @@ table.CodeRay td.code>pre{padding:0}
    -
    <cloud:properties id="cloudProperties"/>
    +
    <cloud:properties id="cloudProperties"/>
    @@ -1468,7 +1487,7 @@ table.CodeRay td.code>pre{padding:0}