code: public static EbeanParsedConfig parseFromConfig(Config config) {
          Config playEbeanConfig = config.getConfig("play.ebean");
          String defaultDatasource = playEbeanConfig.getString("defaultDatasource");
          String ebeanConfigKey = playEbeanConfig.getString("config");
  
          Map<String, List<String>> datasourceModels = new HashMap<>();
  
          if (config.hasPath(ebeanConfigKey)) {
              Config ebeanConfig = config.getConfig(ebeanConfigKey);
              ebeanConfig.root().forEach((key, raw) -> {
                  List<String> models;
                  if (raw.valueType() == ConfigValueType.STRING) {
                      // Support legacy comma separated string
                      models = Arrays.asList(((String) raw.unwrapped()).split(","));
                  } else {
                      models = ebeanConfig.getStringList(key);
                  }
  
                  datasourceModels.put(key, models);
              });
          }
          return new EbeanParsedConfig(defaultDatasource, datasourceModels);
      }
docs: Parse a play configuration.
  
  @param config play configuration
  @return ebean parsed configuration
  @see com.typesafe.config.Config