SHARE
TWEET

Untitled

a guest Oct 4th, 2017 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. doctrine:
  2.   dbal:
  3.     default_connection: default
  4.     connections:
  5.       default:
  6.         driver:   "%database_driver%"
  7.         host:     "%database_host%"
  8.         port:     "%database_port%"
  9.         dbname:   "%database_name%"
  10.         user:     "%database_user%"
  11.         password: "%database_password%"
  12.         charset:  UTF8
  13.       customer:
  14.         driver:   "%database_driver2%"
  15.         host:     "%database_host2%"
  16.         port:     "%database_port2%"
  17.         dbname:   "%database_name2%"
  18.         user:     "%database_user2%"
  19.         password: "%database_password2%"
  20.         charset:  UTF8
  21.    
  22. @ConfigurationProperties
  23. public class DatabaseProperties {
  24.  
  25.     private Connection primaryConnection;
  26.  
  27.     private Connection backupConnection;
  28.  
  29.     // getter, setter ...
  30.  
  31.     public static class Connection {
  32.  
  33.         private String host;
  34.  
  35.         // getter, setter ...
  36.  
  37.     }
  38.  
  39. }
  40.    
  41. @ConfigurationProperties
  42. public class DatabaseProperties {
  43.  
  44.     @NestedConfigurationProperty
  45.     private Connection primaryConnection; // Connection is defined somewhere else
  46.  
  47.     @NestedConfigurationProperty
  48.     private Connection backupConnection;
  49.  
  50.     // getter, setter ...
  51.  
  52. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top