{"id":19407937,"url":"https://github.com/codedrinker/heroku-spring-boot-mybatis-mysql-flyway-example","last_synced_at":"2025-08-23T05:39:29.578Z","repository":{"id":79744207,"uuid":"99389939","full_name":"codedrinker/heroku-spring-boot-mybatis-mysql-flyway-example","owner":"codedrinker","description":"Demo project showing how to deploy a Spring Boot application to Heroku, integration MySQL, MyBatis, Flyway Migration, Logging system.","archived":false,"fork":false,"pushed_at":"2018-05-01T13:16:21.000Z","size":29,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-24T09:41:09.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codedrinker.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-08-05T00:58:29.000Z","updated_at":"2020-03-15T01:18:42.000Z","dependencies_parsed_at":"2023-05-16T18:16:41.430Z","dependency_job_id":null,"html_url":"https://github.com/codedrinker/heroku-spring-boot-mybatis-mysql-flyway-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codedrinker/heroku-spring-boot-mybatis-mysql-flyway-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedrinker%2Fheroku-spring-boot-mybatis-mysql-flyway-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedrinker%2Fheroku-spring-boot-mybatis-mysql-flyway-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedrinker%2Fheroku-spring-boot-mybatis-mysql-flyway-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedrinker%2Fheroku-spring-boot-mybatis-mysql-flyway-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codedrinker","download_url":"https://codeload.github.com/codedrinker/heroku-spring-boot-mybatis-mysql-flyway-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedrinker%2Fheroku-spring-boot-mybatis-mysql-flyway-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745625,"owners_count":24813513,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-10T12:04:36.207Z","updated_at":"2025-08-23T05:39:29.559Z","avatar_url":"https://github.com/codedrinker.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# heroku-spring-boot-mybatis-mysql-flyway\nThis is a small demo application for showing how to run a [Spring Boot](http://projects.spring.io/spring-boot/)\napplication on [Heroku](http://heroku.com). Integration [MySQL](https://devcenter.heroku.com/articles/cleardb), [MyBatis](http://www.mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/#), [Flyway Database Migration](https://flywaydb.org/), [Logging](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-logging.html), [Spring Profiles](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-profiles.html) etc.\n\n## Running the application\nBefore starting the application you should execute the following commands to change to default db to MySQL.\n```\nheroku addons:destroy heroku-postgresql\nheroku addons:create cleardb:ignite\n```\nTo run the application from your IDE, simply run the `com.codedrinker.Application` class as\na Java Application with `dev` [profile](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-profiles.html).  \n\u003cimg src=\"http://www.majiang.life/repository/asserts/spring-profile.png\" width=\"350\"\u003e\nIf does not work, input `-Dspring.profiles.active=dev` to VM Options.\nAlso you can start from the termial using maven with `mvn spring-boot:run -Dspring.profiles.active=dev`  \n\nTo run the application on Heroku is automated. We just get the `Procfic` for Heroku.\n```\nweb: java -jar -Dspring.profiles.active=production target/heroku-spring-boot-mybatis-mysql-flyway-1.0.0.jar\n```\n\n## 中文说明\n当前项目是修改之前 Heroku 官方的示例，添加了 Spring，MyBatis，Druid，Flyway，Lombok等方便的功能。  \n使用过程中，克隆代码以后需要修改一些地方\n\n### 修改\n```bash\nV1__Create_admin_table.sql 内容修改\nindex.html 文案\napp.json 内容和描述\npom.xml 项目名称和ID\nProcfile 对应的项目名称\napplication-dev.yml 对应的H2地址\nReadme 相关内容\n```\n### 运行\n直接按照下图运行即可  \n\u003cimg src=\"http://www.majiang.life/repository/asserts/spring-profile.png\" width=\"350\"\u003e  \n或者使用`-Dspring.profiles.active=dev` 参数配置。\n如果使用 jar 的方式运行使用如下命令\n\n```\njava -jar -Dspring.profiles.active=production target/heroku-spring-boot-mybatis-mysql-flyway-1.0.0.jar\n```\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2017 Chunlei Wang\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodedrinker%2Fheroku-spring-boot-mybatis-mysql-flyway-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodedrinker%2Fheroku-spring-boot-mybatis-mysql-flyway-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodedrinker%2Fheroku-spring-boot-mybatis-mysql-flyway-example/lists"}