Record Class Tm1ServersProperties

java.lang.Object
java.lang.Record
io.skipcheck.tm1.spring.boot.autoconfigure.Tm1ServersProperties
Record Components:
servers - each server's properties, by name

@ConfigurationProperties("tm1") public record Tm1ServersProperties(Map<String, Tm1Properties> servers) extends Record
The tm1.servers.<name>.* properties: several TM1 servers, each by a name of your choosing, with the same properties as tm1.*.
# src/main/resources/application.yml
tm1:
  servers:
    # Each server under a name of your choosing, with the same settings as tm1
    planning:
      address: http://localhost:8010
      user: admin
      password: ""
    reporting:
      address: http://localhost:8011
      user: admin
      password: ""

Each name gets its own beans (see Tm1AutoConfiguration), qualified by the name. tm1.* is the server named default: tm1.servers.default.* is the same server, and setting both is an error. The default server's beans are the ones a plain Tm1Client injection gets.

The starter binds these itself, server by server, when it creates their beans; there's no bean of this type.

  • Constructor Details

    • Tm1ServersProperties

      public Tm1ServersProperties(@DefaultValue Map<String, Tm1Properties> servers)
      Creates an instance of a Tm1ServersProperties record class.
      Parameters:
      servers - the value for the servers record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • servers

      public Map<String, Tm1Properties> servers()
      Returns the value of the servers record component.
      Returns:
      the value of the servers record component