Merge pull request #13739 from dskarzh/inheritable-component-annotations
Make component annotations inheritable
This commit is contained in:
		
						commit
						67fa496732
					
				@ -17,10 +17,11 @@ package org.thingsboard.server.coapserver;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Inherited;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
 | 
			
		||||
@Inherited
 | 
			
		||||
@Retention(RetentionPolicy.RUNTIME)
 | 
			
		||||
@ConditionalOnExpression("'${service.type:null}'=='tb-transport' || ('${service.type:null}'=='monolith' && '${transport.api_enabled:true}'=='true' && '${coap.server.enabled}'=='true')")
 | 
			
		||||
public @interface TbCoapServerComponent {
 | 
			
		||||
}
 | 
			
		||||
public @interface TbCoapServerComponent {}
 | 
			
		||||
 | 
			
		||||
@ -17,11 +17,12 @@ package org.thingsboard.server.coapserver;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Inherited;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
 | 
			
		||||
@Inherited
 | 
			
		||||
@Retention(RetentionPolicy.RUNTIME)
 | 
			
		||||
@ConditionalOnExpression("'${service.type:null}'=='tb-transport' || " +
 | 
			
		||||
        "('${service.type:null}'=='monolith' && '${transport.api_enabled:true}'=='true' && '${coap.server.enabled}'=='true' && '${transport.coap.enabled}'=='true')")
 | 
			
		||||
public @interface TbCoapTransportComponent {
 | 
			
		||||
}
 | 
			
		||||
public @interface TbCoapTransportComponent {}
 | 
			
		||||
 | 
			
		||||
@ -17,12 +17,13 @@ package org.thingsboard.server.queue.edqs;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Inherited;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
 | 
			
		||||
@Inherited
 | 
			
		||||
@Retention(RetentionPolicy.RUNTIME)
 | 
			
		||||
@ConditionalOnExpression("'${queue.edqs.sync.enabled:true}'=='true' && ('${service.type:null}'=='edqs' || " +
 | 
			
		||||
        "(('${service.type:null}'=='monolith' || '${service.type:null}'=='tb-core') && " +
 | 
			
		||||
        "'${queue.edqs.mode:null}'=='local'))")
 | 
			
		||||
public @interface EdqsComponent {
 | 
			
		||||
}
 | 
			
		||||
public @interface EdqsComponent {}
 | 
			
		||||
 | 
			
		||||
@ -17,10 +17,11 @@ package org.thingsboard.server.queue.edqs;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Inherited;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
 | 
			
		||||
@Inherited
 | 
			
		||||
@Retention(RetentionPolicy.RUNTIME)
 | 
			
		||||
@ConditionalOnExpression("'${queue.edqs.sync.enabled:true}'=='true' && '${service.type:null}'=='monolith' && '${queue.edqs.mode:null}'=='local' && '${queue.type:null}'=='in-memory'")
 | 
			
		||||
public @interface InMemoryEdqsComponent {
 | 
			
		||||
}
 | 
			
		||||
public @interface InMemoryEdqsComponent {}
 | 
			
		||||
 | 
			
		||||
@ -17,12 +17,13 @@ package org.thingsboard.server.queue.edqs;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Inherited;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
 | 
			
		||||
@Inherited
 | 
			
		||||
@Retention(RetentionPolicy.RUNTIME)
 | 
			
		||||
@ConditionalOnExpression("'${queue.edqs.sync.enabled:true}'=='true' && ('${service.type:null}'=='edqs' || " +
 | 
			
		||||
        "(('${service.type:null}'=='monolith' || '${service.type:null}'=='tb-core') && " +
 | 
			
		||||
        "'${queue.edqs.mode:null}'=='local' && '${queue.type:null}'=='kafka'))")
 | 
			
		||||
public @interface KafkaEdqsComponent {
 | 
			
		||||
}
 | 
			
		||||
public @interface KafkaEdqsComponent {}
 | 
			
		||||
 | 
			
		||||
@ -17,10 +17,11 @@ package org.thingsboard.server.queue.util;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Inherited;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
 | 
			
		||||
@Inherited
 | 
			
		||||
@Retention(RetentionPolicy.RUNTIME)
 | 
			
		||||
@ConditionalOnExpression("'${service.type:null}'=='monolith' || '${service.type:null}'=='tb-core'")
 | 
			
		||||
public @interface TbCoreComponent {
 | 
			
		||||
}
 | 
			
		||||
public @interface TbCoreComponent {}
 | 
			
		||||
 | 
			
		||||
@ -17,10 +17,11 @@ package org.thingsboard.server.queue.util;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Inherited;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
 | 
			
		||||
@Inherited
 | 
			
		||||
@Retention(RetentionPolicy.RUNTIME)
 | 
			
		||||
@ConditionalOnExpression("('${service.type:null}'=='tb-transport' || ('${service.type:null}'=='monolith' && '${transport.api_enabled:true}'=='true' && '${transport.lwm2m.enabled}'=='true')) && '${transport.lwm2m.bootstrap.enabled:false}'=='true'")
 | 
			
		||||
public @interface TbLwM2mBootstrapTransportComponent {
 | 
			
		||||
}
 | 
			
		||||
public @interface TbLwM2mBootstrapTransportComponent {}
 | 
			
		||||
 | 
			
		||||
@ -17,10 +17,11 @@ package org.thingsboard.server.queue.util;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Inherited;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
 | 
			
		||||
@Inherited
 | 
			
		||||
@Retention(RetentionPolicy.RUNTIME)
 | 
			
		||||
@ConditionalOnExpression("'${service.type:null}'=='tb-transport' || ('${service.type:null}'=='monolith' && '${transport.api_enabled:true}'=='true' && '${transport.lwm2m.enabled}'=='true')")
 | 
			
		||||
public @interface TbLwM2mTransportComponent {
 | 
			
		||||
}
 | 
			
		||||
public @interface TbLwM2mTransportComponent {}
 | 
			
		||||
 | 
			
		||||
@ -17,10 +17,11 @@ package org.thingsboard.server.queue.util;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Inherited;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
 | 
			
		||||
@Inherited
 | 
			
		||||
@Retention(RetentionPolicy.RUNTIME)
 | 
			
		||||
@ConditionalOnExpression("'${service.type:null}'=='monolith' || '${service.type:null}'=='tb-rule-engine'")
 | 
			
		||||
public @interface TbRuleEngineComponent {
 | 
			
		||||
}
 | 
			
		||||
public @interface TbRuleEngineComponent {}
 | 
			
		||||
 | 
			
		||||
@ -18,12 +18,13 @@ package org.thingsboard.server.queue.util;
 | 
			
		||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.ElementType;
 | 
			
		||||
import java.lang.annotation.Inherited;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
import java.lang.annotation.Target;
 | 
			
		||||
 | 
			
		||||
@Inherited
 | 
			
		||||
@ConditionalOnExpression("'${service.type:null}'=='tb-transport' || ('${service.type:null}'=='monolith' && '${transport.api_enabled:true}'=='true' && '${transport.snmp.enabled}'=='true')")
 | 
			
		||||
@Retention(RetentionPolicy.RUNTIME)
 | 
			
		||||
@Target({ElementType.TYPE, ElementType.METHOD})
 | 
			
		||||
public @interface TbSnmpTransportComponent {
 | 
			
		||||
}
 | 
			
		||||
public @interface TbSnmpTransportComponent {}
 | 
			
		||||
 | 
			
		||||
@ -17,10 +17,11 @@ package org.thingsboard.server.queue.util;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Inherited;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
 | 
			
		||||
@Inherited
 | 
			
		||||
@Retention(RetentionPolicy.RUNTIME)
 | 
			
		||||
@ConditionalOnExpression("('${service.type:null}'=='monolith' && '${transport.api_enabled:true}'=='true') || '${service.type:null}'=='tb-transport'")
 | 
			
		||||
public @interface TbTransportComponent {
 | 
			
		||||
}
 | 
			
		||||
public @interface TbTransportComponent {}
 | 
			
		||||
 | 
			
		||||
@ -17,10 +17,11 @@ package org.thingsboard.server.queue.util;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Inherited;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
 | 
			
		||||
@Inherited
 | 
			
		||||
@Retention(RetentionPolicy.RUNTIME)
 | 
			
		||||
@ConditionalOnExpression("'${service.type:null}'=='monolith' || '${service.type:null}'=='tb-vc-executor'")
 | 
			
		||||
public @interface TbVersionControlComponent {
 | 
			
		||||
}
 | 
			
		||||
public @interface TbVersionControlComponent {}
 | 
			
		||||
 | 
			
		||||
@ -17,10 +17,11 @@ package org.thingsboard.server.transport.mqtt;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Inherited;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
 | 
			
		||||
@Inherited
 | 
			
		||||
@Retention(RetentionPolicy.RUNTIME)
 | 
			
		||||
@ConditionalOnExpression("'${service.type:null}'=='tb-transport' || ('${service.type:null}'=='monolith' && '${transport.api_enabled:true}'=='true' && '${transport.mqtt.enabled}'=='true')")
 | 
			
		||||
public @interface TbMqttTransportComponent {
 | 
			
		||||
}
 | 
			
		||||
public @interface TbMqttTransportComponent {}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user