Browse Source

add missing @Profile

sunyj 7 years ago
parent
commit
c0acf47af7

+ 7 - 1
sso-server/src/main/java/com/uas/sso/profile/Dev.java

@@ -1,11 +1,17 @@
 package com.uas.sso.profile;
 
+import org.springframework.context.annotation.Profile;
+
 import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
  * created by shicr on 2017/11/23
  **/
-@Target({ElementType.TYPE,ElementType.METHOD})
+@Target({ ElementType.TYPE, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+@Profile("dev")
 public @interface Dev {
 }

+ 10 - 0
sso-server/src/main/java/com/uas/sso/profile/Prod.java

@@ -1,7 +1,17 @@
 package com.uas.sso.profile;
 
+import org.springframework.context.annotation.Profile;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
 /**
  * created by shicr on 2017/11/23
  **/
+@Target({ ElementType.TYPE, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+@Profile("prod")
 public @interface Prod {
 }

+ 10 - 0
sso-server/src/main/java/com/uas/sso/profile/Test.java

@@ -1,7 +1,17 @@
 package com.uas.sso.profile;
 
+import org.springframework.context.annotation.Profile;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
 /**
  * created by shicr on 2017/11/23
  **/
+@Target({ ElementType.TYPE, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+@Profile("test")
 public @interface Test {
 }