private Path ensurePluginDirExists(Path home, String pluginDir) {
        Path path = home.resolve(pluginDir)
                .toAbsolutePath();
        if (Files.isDirectory(path)) {
            return path;
        }
        try {
            Files.createDirectories(path);
        } catch (FileAlreadyExistsException e) {
            throw new RuntimeException(
                    "The path ("
                            + path
                            + ") of the plugin directory points to an existing file",
                    e);
        } catch (IOException e) {
            throw new RuntimeException(
                    "Failed to create the plugin directory: "
                            + path,
                    e);
        }
        return path;
    }
@implNote Start plugins after all beans are ready so that plugins can get any bean when
          starting.
turms-server-common/src/main/java/im/turms/server/common/infra/plugin/PluginManager.java