SmartSwaggerApiModelEnumConfig.java 951 B

1234567891011121314151617181920212223242526272829
  1. package net.lab1024.smartadmin.config;
  2. import net.lab1024.smartadmin.common.swagger.SmartSwaggerApiModelEnumPlugin;
  3. import org.springframework.context.annotation.Bean;
  4. import org.springframework.context.annotation.Configuration;
  5. import org.springframework.context.annotation.Profile;
  6. import org.springframework.core.annotation.Order;
  7. import springfox.documentation.swagger.common.SwaggerPluginSupport;
  8. /**
  9. * [ 对于枚举类进行swagger注解,与前端的vue-enum相匹配 ]
  10. *
  11. * @author yandanyang
  12. * @version 1.0
  13. * @company 1024lab.net
  14. * @copyright (c) 2018 1024lab.netInc. All rights reserved.
  15. * @date 2019/8/9 0009 上午 9:46
  16. * @since JDK1.8
  17. */
  18. @Configuration
  19. @Profile({"dev", "sit", "pre", "prod"})
  20. public class SmartSwaggerApiModelEnumConfig {
  21. @Bean
  22. @Order(SwaggerPluginSupport.SWAGGER_PLUGIN_ORDER + 1)
  23. public SmartSwaggerApiModelEnumPlugin swaggerEnum(){
  24. return new SmartSwaggerApiModelEnumPlugin();
  25. }
  26. }