{"id":15498637,"url":"https://github.com/jwenjian/spring-boot-starter-fastdfs","last_synced_at":"2025-04-05T18:40:27.666Z","repository":{"id":98636190,"uuid":"132202135","full_name":"jwenjian/spring-boot-starter-fastdfs","owner":"jwenjian","description":"A spring boot starter for fastdfs java client.It just works.","archived":false,"fork":false,"pushed_at":"2018-06-06T00:51:52.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-11T15:58:43.287Z","etag":null,"topics":["fastdfs","fastdfs-client","spring-boot-starter"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jwenjian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-05-05T00:48:53.000Z","updated_at":"2018-07-07T02:10:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"597c3156-47a2-4039-b92a-650cdff02566","html_url":"https://github.com/jwenjian/spring-boot-starter-fastdfs","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"0a44f7e5b2e1d149ad87b8dcc7e585289d306ffa"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwenjian%2Fspring-boot-starter-fastdfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwenjian%2Fspring-boot-starter-fastdfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwenjian%2Fspring-boot-starter-fastdfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwenjian%2Fspring-boot-starter-fastdfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwenjian","download_url":"https://codeload.github.com/jwenjian/spring-boot-starter-fastdfs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247385320,"owners_count":20930590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastdfs","fastdfs-client","spring-boot-starter"],"created_at":"2024-10-02T08:47:02.320Z","updated_at":"2025-04-05T18:40:27.637Z","avatar_url":"https://github.com/jwenjian.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spring-boot-starter-fastdfs\nA spring boot starter for fastdfs java client. [![](https://jitpack.io/v/jwenjian/spring-boot-starter-fastdfs.svg)](https://jitpack.io/#jwenjian/spring-boot-starter-fastdfs)\n\n## Why\nNormally, we use the fastdfs java client in the `fastdfs_client.conf` way.\nIt works well, util we start to using spring boot.\n\nThe configuration file way cannot meet out active profile of spring boot, like: `dev`, `test`, `pro`, we want\nthe client more *smart* in a spring boot way.\n\nSo, here it comes.\n\n## How to install\n1. Add a maven repository to your `pom.xml`\n```xml\n\t\u003crepositories\u003e\n\t\t\u003crepository\u003e\n\t\t    \u003cid\u003ejitpack.io\u003c/id\u003e\n\t\t    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\t\t\u003c/repository\u003e\n\t\u003c/repositories\u003e\n```\n2. Add the dependency\n```xml\n\t\u003cdependency\u003e\n\t    \u003cgroupId\u003ecom.github.jwenjian\u003c/groupId\u003e\n\t    \u003cartifactId\u003espring-boot-starter-fastdfs\u003c/artifactId\u003e\n\t    \u003cversion\u003e${version}\u003c/version\u003e\n\t\u003c/dependency\u003e\n```\n## How to config\nIf you know how to config original `client_conf.properties`, then you will know how to config this project.\n\nAdd configuration items to your `application-${profile}.properties` or `application-${profile}.yml`:\n\n- Properties\n```properties\nspring.fastdfs.tracker_servers= # the tracker server urls\nspring.fastdfs.connect_timeout_in_seconds= # the connect timeout in seconds\nspring.fastdfs.network_timeout_in_seconds= # the network timeout in seconds\nspring.fastdfs.charset= # the.charset\nspring.fastdfs.http_anti_steal_token= # the http anti-steal token\nspring.fastdfs.http_secret_key= # the http secret key\nspring.fastdfs.http_tracker_http_port= # the http tracker http port\nspring.fastdfs.init_conn_on_load= # if init connection on server loaded\n```\n\n- Yaml\n```yaml\nspring:\n    fastdfs:\n        tracker_servers: # the tracker server urls\n        connect_timeout_in_seconds: # the connect timeout in seconds\n        network_timeout_in_seconds: # the network timeout in seconds\n        charset: # the.charset\n        http_anti_steal_token: # the http anti-steal token\n        http_secret_key: # the http secret key\n        http_tracker_http_port: # the http tracker http port\n        init_conn_on_load: # if init connection on server loaded\n```\n\n## How to use\n\nBelow is the sample code:\n```java\n@RestController\npublic class DemoController {\n\n    @Autowired\n    private FastDfsManager fastDfsManager;\n\n\n    @PostMapping(\"/upload\")\n    public void upload(final MultipartFile file) throws IOException, MyException {\n        final String[] results = fastDfsManager.getStorageClient1().upload_file(file.getBytes(), \"jpg\", null);\n\n        System.out.println(Arrays.toString(results));\n    }\n\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwenjian%2Fspring-boot-starter-fastdfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwenjian%2Fspring-boot-starter-fastdfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwenjian%2Fspring-boot-starter-fastdfs/lists"}