{"id":17871809,"url":"https://github.com/markiewb/spring-boot-propertieslauncher-with-external-jar","last_synced_at":"2025-03-21T19:31:34.227Z","repository":{"id":38532698,"uuid":"150848309","full_name":"markiewb/spring-boot-propertieslauncher-with-external-jar","owner":"markiewb","description":"Example for a self-executable Spring Boot JAR, which accesses a 3rd-party JAR from a external directory. ","archived":false,"fork":false,"pushed_at":"2019-04-25T21:00:36.000Z","size":1855,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T04:16:18.141Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markiewb.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}},"created_at":"2018-09-29T09:26:49.000Z","updated_at":"2024-03-26T16:39:36.000Z","dependencies_parsed_at":"2022-09-02T01:02:31.934Z","dependency_job_id":null,"html_url":"https://github.com/markiewb/spring-boot-propertieslauncher-with-external-jar","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/markiewb%2Fspring-boot-propertieslauncher-with-external-jar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markiewb%2Fspring-boot-propertieslauncher-with-external-jar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markiewb%2Fspring-boot-propertieslauncher-with-external-jar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markiewb%2Fspring-boot-propertieslauncher-with-external-jar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markiewb","download_url":"https://codeload.github.com/markiewb/spring-boot-propertieslauncher-with-external-jar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244855472,"owners_count":20521650,"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":[],"created_at":"2024-10-28T10:39:17.620Z","updated_at":"2025-03-21T19:31:33.525Z","avatar_url":"https://github.com/markiewb.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Example for a self-executable Spring Boot JAR, which accesses a DB driver (or any other 3rd-party JAR) from a external (non-bundled) directory. \n\nThis may be useful if you are not allowed to bundle the DB driver with your application.\n\nTips:\n* Use `ZIP` as layout in `spring-boot-maven-plugin` (to generate the `PropertiesLauncher` entry in the `MANIFEST.MF`)\n* Set `\u003cexecutable\u003etrue\u003c/executable\u003e` to prepend a shell script to the resulting JAR\n* See [command line examples](run.sh) for different types of running the JAR using the `loader.path` option\n\n\n## Expected result\n\nHave a look for the output \n\n```\nTry to use external driver\n-------------\u003e Found driver h2 1.4\n```\nin all variants. The same application is started using different types of loading an external jar. \n\n```\n--------------------------\nVariant A via java -jar\n--------------------------\n...\n2019-04-25 22:51:59.934  INFO 26947 --- [           main] com.example.x.Application                : Started Application in 6.005 seconds (JVM running for 6.465)\nTry to use external driver\n-------------\u003e Found driver h2 1.4\n\n--------------------------\nVariant B via java -jar\n--------------------------\n...\n2019-04-25 22:52:06.447  INFO 26948 --- [           main] com.example.x.Application                : Started Application in 5.996 seconds (JVM running for 6.456)\nTry to use external driver\n-------------\u003e Found driver h2 1.4\n\n------------------------------------------------------------------------------------------------\nVariant C via self-executable and loader.path-configuration from (default-) loader.properties\n------------------------------------------------------------------------------------------------\n...\nTry to use external driver\n-------------\u003e Found driver h2 1.4\n\n--------------------------------------------------------------------------------------------\nVariant D via self-executable and loader.path-configuration from different property file \n--------------------------------------------------------------------------------------------\n...\n2019-04-25 22:52:19.494  INFO 26979 --- [           main] com.example.x.Application                : Started Application in 6.005 seconds (JVM running for 6.453)\nTry to use external driver\n-------------\u003e Found driver h2 1.4\n\n------------------------------------------------------------\nVariant E via self-executable and LOADER_PATH environment\n------------------------------------------------------------\n...\n2019-04-25 22:52:26.024  INFO 26995 --- [           main] com.example.x.Application                : Started Application in 5.967 seconds (JVM running for 6.439)\nTry to use external driver\n-------------\u003e Found driver h2 1.4\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkiewb%2Fspring-boot-propertieslauncher-with-external-jar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkiewb%2Fspring-boot-propertieslauncher-with-external-jar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkiewb%2Fspring-boot-propertieslauncher-with-external-jar/lists"}