I'm creating some simple spring project (spring security) with a configuration file determining some simple values like table names etc. I defined there a boolean field REQUIRED_ACTIVATION for determining if new user have to activate his account with activation link sent for example via mail.
public static final boolean REQUIRED_ACTIVATION = true;
If I set REQUIRED_ACTIVATION value to false user is active immediately after registration. I've got defined entity which contains data for activation links:
@Entity
@Table(name = 'user_activation_link')
public class UserActivationLink {
[...]
}
When REQUIRED_ACTIVATION is set to false I'm not using this class anywhere but the table is being created in database. Is there any solution for determining if table will be created dependent on value of REQUIRED_ACTIVATION?