{"id":21243296,"url":"https://github.com/dilldong/webmind","last_synced_at":"2025-07-04T16:02:39.055Z","repository":{"id":53091550,"uuid":"65441317","full_name":"dilldong/webmind","owner":"dilldong","description":"Webmind is a lightweight web service framework that integrates with SpringFramework.","archived":false,"fork":false,"pushed_at":"2024-06-17T03:22:23.000Z","size":8016,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-06-17T04:36:05.265Z","etag":null,"topics":["java","lightweight","microservice","mindframework","spring","webmind"],"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/dilldong.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-11T05:34:44.000Z","updated_at":"2024-06-17T03:22:08.000Z","dependencies_parsed_at":"2024-04-29T14:54:15.148Z","dependency_job_id":"1323cc1b-6ba3-46d8-b80f-776df9a4f4fd","html_url":"https://github.com/dilldong/webmind","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilldong%2Fwebmind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilldong%2Fwebmind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilldong%2Fwebmind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilldong%2Fwebmind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dilldong","download_url":"https://codeload.github.com/dilldong/webmind/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225653687,"owners_count":17502940,"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":["java","lightweight","microservice","mindframework","spring","webmind"],"created_at":"2024-11-21T01:11:40.640Z","updated_at":"2025-07-04T16:02:39.049Z","avatar_url":"https://github.com/dilldong.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Webmind Framework\n\n[![License](https://img.shields.io/github/license/dilldong/webmind)](https://raw.githubusercontent.com/dilldong/webmind/master/LICENSE)\n[![Maven2.0](https://img.shields.io/badge/maven-build-blue)](https://mvnrepository.com/artifact/io.github.dilldong/webmind-framework)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e457baf96038467f814c72d0300eda44)](https://app.codacy.com/gh/dilldong/webmind/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n\nWebmind is a lightweight web service framework that integrates with SpringFramework. Realize the embedded startup of Tomcat, which is easy to use, occupies less memory, responds quickly, and has stable service. Suitable for Java microservices and web projects.\n## Maven\nAdd the following Maven dependency to your project's pom.xml\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.dilldong\u003c/groupId\u003e\n    \u003cartifactId\u003ewebmind-framework\u003c/artifactId\u003e\n    \u003cversion\u003e4.7.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n## Gradle\n```text\nimplementation 'io.github.dilldong:webmind-framework:4.7.0'\n```\n\n## Example\n### 1. Mapping\n```java\n@Controller\npublic class HelloController {\n    \n    @Mapping\n    public String first() {\n        return \"Welcome usage Webmind-Framework.\";\n    }\n\n    // Spec a GET request, text response.\n    @Mapping(value = \"/request/text\", method = RequestMethod.GET)\n    public String withText() {\n        return \"Hello,This is Webmind-Framework.\";\n    }\n    \n    // Spec a URL parameter, text response.\n    @Mapping(value = \"/request/text/${name}\", method = RequestMethod.GET)\n    public String withText(String name) {\n        return \"Hello \"+ name +\",This is Webmind-Framework.\";\n    }\n\n    // Json response\n    @Mapping(\"/request/json\")\n    public Response\u003cString\u003e withJson() {\n        return new Response\u003cString\u003e(HttpStatus.SC_OK, \"OK\");\n    }\n\n    // Json body response\n    @Mapping(\"/request/json2\")\n    public String withJsonResult() {\n        return new Response\u003cMap\u003cString, Object\u003e\u003e(HttpStatus.SC_OK, \"OK\")\n                .setResult(ImmutableMap.of(\"nickName\", \"Smith\", \"age\", 26, \"gender\", \"Male\"))\n                .toJson();\n    }\n\n    // redirect\n    @Mapping(\"/request/redirect\")\n    public String redirect() {\n        return \"redirect:https://github.com/dilldong\";\n    }\n\n    // forward\n    @Mapping(\"/request/forward\")\n    public String forward() {\n        return \"forward:https://github.com/dilldong\";\n    }\n\n    // javascript response\n    @Mapping(\"/request/js\")\n    public String js() {\n        return \"script:alert('This is JS window.');\";\n    }\n\n    // velocity template engine\n    @Mapping(\"/request/velocity\")\n    public Render velocity() {\n        return new TemplateRender(\"/template/index.vm\");\n    }\n}\n```\n\n### 2. Interceptor\n```java\n@Component\n@Interceptor(value = {\"/user/*\"}, excludes = {\"/login\"})\npublic class InterceptorClass extends AbstractHandlerInterceptor {\n    // Processing your business\n}\n```\n\n### 3. Filter\n```java\n@Component\n@Filter(value = {\"/*\"})\npublic class WebFilter extends AbstractHandlerFilter {\n    // Processing your business\n}\n```\n\n### 4. CrossOrigin `Spring-based CrossOrigin annotation`\n```java\n@Controller\npublic class GithubController {\n\n    @Mapping\n    @CrossOrigin(\"*.github.com\")\n    public String fromGithub() {\n        // Processing your business\n    }\n}\n```\n\n### 5. Startup Web Application\n```java\n@Import(AppConfiguration.class)\npublic class Application {\n    public static void main(String[] args) {\n        SpringApplication.run(Application.class, args);\n    }\n}\n```\n### or\n```java\npublic class Application {\n    public static void main(String[] args) {\n        SpringApplication.run(\n                new String[]{\"springContext.xml\", \"mybatisplusConfig.xml\"},\n                args);\n    }\n}\n```\n### 6. Startup Non-Web Application\n```java\n@Import(AppConfiguration.class)\npublic class Application {\n    public static void main(String[] args) {\n        SpringApplication application = SpringApplication.runApplication(Application.class, args);\n        \n        // start your business\n        ContextSupport.getBeans(StartService.class).forEach((k, v) -\u003e {\n            v.doStart();\n        });\n\n        // shutdown for waiting\n        application.waiting(20L, TimeUnit.SECONDS);\n    }\n}\n```\n### or\n```java\npublic class Application {\n    public static void main(String[] args) {\n        SpringApplication application =\n                SpringApplication.runApplication(\n                        new String[]{\"springContext.xml\", \"mybatisplusConfig.xml\"},\n                        args);\n                        \n        // start your business                \n        ContextSupport.getBeans(StartService.class).forEach((k, v) -\u003e {\n            v.doStart();\n        });\n\n        // shutdown for waiting\n        application.waiting(20L, TimeUnit.SECONDS);\n    }\n}\n```\n## License\nThe Webmind Framework is released under version 2.0 of the Apache License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdilldong%2Fwebmind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdilldong%2Fwebmind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdilldong%2Fwebmind/lists"}