1 新建module
2.选择maven
3 填写配置
4.修改pom文件
可以把jeecg-boot-module-system.pom文件复制进来 记得改artifactId
1. <project xmlns="http://maven.apache.org/POM/4.0.0" 2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4. <modelVersion>4.0.0</modelVersion> 5. <artifactId>jeecg-boot-module-test</artifactId> 6. <version>2.1.0</version> 7. 8. <parent> 9. <groupId>org.jeecgframework.boot</groupId> 10. <artifactId>jeecg-boot-parent</artifactId> 11. <version>2.1.0</version> 12. </parent> 13. 14. <repositories> 15. <repository> 16. <id>aliyun</id> 17. <name>aliyun Repository</name> 18. <url>http://maven.aliyun.com/nexus/content/groups/public</url> 19. <snapshots> 20. <enabled>false</enabled> 21. </snapshots> 22. </repository> 23. <repository> 24. <id>jeecg</id> 25. <name>jeecg Repository</name> 26. <url>http://maven.jeecg.org/nexus/content/repositories/jeecg</url> 27. <snapshots> 28. <enabled>false</enabled> 29. </snapshots> 30. </repository> 31. </repositories> 32. 33. <dependencies> 34. <dependency> 35. <groupId>org.jeecgframework.boot</groupId> 36. <artifactId>jeecg-boot-base-common</artifactId> 37. </dependency> 38. <!-- online form--> 39. <dependency> 40. <groupId>org.jeecgframework.boot</groupId> 41. <artifactId>online-form</artifactId> 42. <version>1.0.2</version> 43. </dependency> 44. <dependency> 45. <groupId>org.hibernate</groupId> 46. <artifactId>hibernate-core</artifactId> 47. <exclusions> 48. <exclusion> 49. <groupId>commons-collections</groupId> 50. <artifactId>commons-collections</artifactId> 51. </exclusion> 52. </exclusions> 53. </dependency> 54. <!-- online form --> 55. 56. </dependencies> 57. 58. <build> 59. <plugins> 60. <plugin> 61. <groupId>org.springframework.boot</groupId> 62. <artifactId>spring-boot-maven-plugin</artifactId> 63. </plugin> 64. </plugins> 65. </build> 66. </project>
添加新包新方法
1. @Slf4j 2. @Api(tags = "新建module--jm") 3. @RestController 4. @RequestMapping("/hello") 5. public class HelloController { 6. @ApiOperation("测试hello方法") 7. @GetMapping(value="/") 8. public Result<String> hello() { 9. Result<String> result = new Result<String>(); 10. result.setResult("hello word!"); 11. result.setSuccess(true); 12. return result; 13. } 14. }
排除拦截