{"id":19711666,"url":"https://github.com/melthaw/spring-mvc-audit","last_synced_at":"2026-05-10T12:41:48.936Z","repository":{"id":87148314,"uuid":"97923071","full_name":"melthaw/spring-mvc-audit","owner":"melthaw","description":"The simple rest audit extension base on Spring MVC framework.","archived":false,"fork":false,"pushed_at":"2018-01-19T12:58:15.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T14:29:00.091Z","etag":null,"topics":["audit","java","spring"],"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/melthaw.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":"2017-07-21T08:08:58.000Z","updated_at":"2017-07-21T08:15:34.000Z","dependencies_parsed_at":"2023-03-13T19:46:21.527Z","dependency_job_id":null,"html_url":"https://github.com/melthaw/spring-mvc-audit","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melthaw%2Fspring-mvc-audit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melthaw%2Fspring-mvc-audit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melthaw%2Fspring-mvc-audit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melthaw%2Fspring-mvc-audit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melthaw","download_url":"https://codeload.github.com/melthaw/spring-mvc-audit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241029926,"owners_count":19896991,"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":["audit","java","spring"],"created_at":"2024-11-11T22:13:13.556Z","updated_at":"2026-05-10T12:41:43.915Z","avatar_url":"https://github.com/melthaw.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nThe simple and quick audit lib for spring mvc http request.\n\nThe audit log will be sent by:\n\n* [Edm](https://github.com/melthaw/spring-event-driven-message)\n* Kafka\n\n# Dependencies\n\n* Spring Mvc Framework (Over 3)\n* in.clouthink:daas-edm:1.* (optional)\n* org.springframework.kafka:spring-kafka:2.* (optional)\n* io.swagger:swagger-annotations:1.5.x\n\n# Usage\n\nSo far the following version is available \n\nmodule name | latest version\n------|------\ndaas-audit | 1.1.0\n\n## Maven\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003ein.clouthink.daas\u003c/groupId\u003e\n        \u003cartifactId\u003edaas-audit\u003c/artifactId\u003e\n        \u003cversion\u003e${daas.audit.version}\u003c/version\u003e\n    \u003c/dependency\u003e\n\n## Gradle\n\n    compile \"in.clouthink.daas:daas-audit:${daas_audit_version}\"\n\n\n## Spring Configuration\n\nUse `@EnableAudit` to get started \n\n    @Configuration\n    @EnableAudit\n    public class Application {}\n\n\nThe principal who triggers audit event is very important, but we don't know which security framework is chosen by end user. \n\nTo make it run , the end user has to supply the minimized implementation as follow\n\n    public class SecurityContextImpl implements SecurityContext {\n    \n        @Override\n        public String getPrincipal() {\n            //TODO\n        }\n    \n    }\n\nAnd add service file which named `in.clouthink.daas.audit.security.SecurityContext` to META-INF/services.\nThe content of the service file should be the full quantifier path of the implementation.\n\n\n## How to customize\n\nWe supply the following extension points to make the customization easy and happy.\n\n* in.clouthink.daas.audit.spi.AuditEventResolver\n* in.clouthink.daas.audit.spi.AuditEventPersister\n\nThe default implementations list as follow:\n\n* in.clouthink.daas.audit.spi.impl.DefaultAuditEventResolver\n* in.clouthink.daas.audit.spi.impl.DefaultAuditEventPersister\n\nThe end user can supply their own implementations and override the default value by `AuditConfigurer`.\n\n    @Bean\n\tpublic AuditConfigurer auditConfigurer() {\n\t\treturn new AuditConfigurer() {\n\n\t\t\t@Override\n\t\t\tpublic void configure(AuditExecutionConfigurer auditExecutionConfigurer) {\n\t\t\t    //do configure\n\t\t\t}\n\n\t\t};\n\t}\n\nHere is the definition of `AuditExecutionConfigurer` , four ways to customize the audit features.\n\n    public interface AuditExecutionConfigurer {\n    \n        /**\n         * RequestMapping is taking by default\n         *\n         * @param auditAnnotationType\n         */\n        void setAuditAnnotationType(Class\u003c? extends Annotation\u003e auditAnnotationType);\n    \n        /**\n         * DefaultAuditEventResolver is taking by default\n         *\n         * @param auditEventResolver\n         */\n        void setAuditEventResolver(AuditEventResolver auditEventResolver);\n    \n        /**\n         * DefaultAuditEventPersister is taking by default\n         *\n         * @param auditEventPersister\n         */\n        void setAuditEventPersister(AuditEventPersister auditEventPersister);\n    \n        /**\n         * @param errorDetailRequired true : the full stack of the error\n         *                            false (default) : only the error message\n         */\n        void setErrorDetailRequired(boolean errorDetailRequired);\n    \n    }\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelthaw%2Fspring-mvc-audit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelthaw%2Fspring-mvc-audit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelthaw%2Fspring-mvc-audit/lists"}