PackageConfig { public String joinPackage(String subPackage) { String parent = getParent(); return StringUtils.isBlank(parent) ? subPackage : (parent + StringPool.DOT + subPackage); }  String getParent(); String joinPackage(String subPackage); Map<String, String> getPackageInfo();  }
@Test void joinPackageTest() { Assertions.assertEquals("com.baomidou.demo", new PackageConfig().joinPackage("demo")); Assertions.assertEquals("com.baomidou.mp.demo", new PackageConfig().setModuleName("mp").joinPackage("demo")); Assertions.assertEquals("com.baomihua.demo", new PackageConfig().setParent("com.baomihua").joinPackage("demo")); Assertions.assertEquals("com.baomihua.mp.demo", new PackageConfig().setParent("com.baomihua").setModuleName("mp").joinPackage("demo")); }