{"id":13511858,"url":"https://github.com/kolorobot/spring-mvc-quickstart-archetype","last_synced_at":"2025-05-16T00:07:21.043Z","repository":{"id":2179700,"uuid":"3126910","full_name":"kolorobot/spring-mvc-quickstart-archetype","owner":"kolorobot","description":"The project is a Maven archetype for Spring MVC web application.","archived":false,"fork":false,"pushed_at":"2022-12-29T07:41:46.000Z","size":1178,"stargazers_count":1045,"open_issues_count":9,"forks_count":475,"subscribers_count":105,"default_branch":"master","last_synced_at":"2025-04-08T11:11:12.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://blog.codeleak.pl","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kolorobot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-01-07T21:53:23.000Z","updated_at":"2025-03-28T01:20:47.000Z","dependencies_parsed_at":"2023-01-11T20:10:48.004Z","dependency_job_id":null,"html_url":"https://github.com/kolorobot/spring-mvc-quickstart-archetype","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/kolorobot%2Fspring-mvc-quickstart-archetype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kolorobot%2Fspring-mvc-quickstart-archetype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kolorobot%2Fspring-mvc-quickstart-archetype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kolorobot%2Fspring-mvc-quickstart-archetype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kolorobot","download_url":"https://codeload.github.com/kolorobot/spring-mvc-quickstart-archetype/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442854,"owners_count":22071878,"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-08-01T03:01:14.196Z","updated_at":"2025-05-16T00:07:16.028Z","avatar_url":"https://github.com/kolorobot.png","language":"Java","funding_links":[],"categories":["Java","I. Development"],"sub_categories":["2. Web development"],"readme":"Spring MVC Quickstart Maven Archetype\n======================================\n\nSummary\n-------\nThe project is a Maven archetype for Spring MVC web application.\n\nGenerated project characteristics\n-------------------------\n* No-xml Spring MVC web application\n* Thymeleaf, Bootstrap\n* JPA (Hibernate/HSQLDB/Spring Data JPA)\n* JUnit/Mockito\n* Spring Security\n* MongoDB (Spring Data Mongo)\n\nPrerequisites\n-------------\n\n- JDK 8 (tested with Java 11)\n- Maven 3 (tested with 3.6.0)\n\nCreate a project\n----------------\n\n```bash\n    mvn archetype:generate \\\n        -DarchetypeGroupId=pl.codeleak \\\n        -DarchetypeArtifactId=spring-mvc-quickstart \\\n        -DarchetypeVersion=5.0.1 \\\n        -DgroupId=my.groupid \\\n        -DartifactId=my-artifactId \\\n        -Dversion=version \\\n        -DarchetypeRepository=http://kolorobot.github.io/spring-mvc-quickstart-archetype\n```\n\nNote: The above command will bootstrap a project using the archetype published here: http://kolorobot.github.io/spring-mvc-quickstart-archetype\n\nRun the project\n----------------\n\nNavigate to newly created project directory (`my-artifactId`) and then run:\n\n```bash\n    mvn test tomcat7:run\n```\n\n\u003e Note: I do not recommend this way of running the artifact. Tomcat Maven Plugin Version 2.2 was released on 2013-11-11 \n\nTest in the browser\n-------------------\n\n\thttp://localhost:8080/\n\nNote: No additional services are required in order to start the application. Mongo DB configuration is in place but it is not used in the code.\n\nCreate a new project in IntelliJ\n--------------------------------\n\n* Create new project `File \u003e New \u003e Project`\n* Click Maven on the left hand side of the new project dialog\n* Check `Create from archetype`\n* Click the `Add Archetype` button\n* Set `Group Id` to `pl.codeleak`\n* Set `Artifact Id` to `spring-mvc-quickstart`\n* Set `Version` to `5.0.1`\n* Set `Repository` to `http://kolorobot.github.io/spring-mvc-quickstart-archetype`\n* Click next and create the project\n\nNote: If you would like to create a project using archetype published in your local repository, skip repository field and make sure it is installed locally (see below).\n\nCreating a new project in Spring Tool Suite\n-------------------------------------------\n\n* Create new project `File \u003e New \u003e Maven Project`\n* Make sure `Create a simple project` option is not selected\n* Click `Next` to navigate to `Select an Archetype` screen\n* Make sure `Include snapshot archetypes` is selected\n* Click `Add Archetype` button\n* Set `Archetype Group Id` to `pl.codeleak`\n* Set `Archetype Artifact Id` to `spring-mvc-quickstart`\n* Set `Archetype Version` to `5.0.1`\n* Set `Repository URL` to `http://kolorobot.github.io/spring-mvc-quickstart-archetype`\n* Click `OK` so the Archetype is added to the list\n* Click `Next` and fill in `Group Id`, `Artifact Id` and `Version` of your new project\n\nNote: Remember so select `Include snapshot archetypes`. \n\nIf you have any troubles with installation in Eclipse, you may want to have a look at this issue: #74\n\n\nInstall archetype locally\n-------------------------\n\nTo install the archetype in your local repository execute the following commands:\n\n```bash\n    git clone https://github.com/kolorobot/spring-mvc-quickstart-archetype.git\n    cd spring-mvc-quickstart-archetype\n    mvn clean install\n```\n\nCreate a project from a local repository\n----------------------------------------\n\nCreate a new empty directory for your project and navigate into it and then run:\n\n```bash\n    mvn archetype:generate \\\n        -DarchetypeGroupId=pl.codeleak \\\n        -DarchetypeArtifactId=spring-mvc-quickstart \\\n        -DarchetypeVersion=5.0.1 \\\n        -DgroupId=my.groupid \\\n        -DartifactId=my-artifactId \\\n        -Dversion=version\n```\n\nNote: The above command will bootstrap a project using the archetype published in your local repository.\n\nSwitching to PostgreSQL\n-----------------------\n\n* Add dependency to PostgreSQL driver in POM:\n\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.postgresql\u003c/groupId\u003e\n    \u003cartifactId\u003epostgresql\u003c/artifactId\u003e\n    \u003cversion\u003e9.4.1207\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n* Change `persistence.properties`:\n\n```\ndataSource.driverClassName=org.postgresql.Driver\ndataSource.url=jdbc:postgresql:postgres\ndataSource.username=postgres\ndataSource.password=postgres\n\nhibernate.dialect=org.hibernate.dialect.PostgreSQL9Dialect\nhibernate.hbm2ddl.auto=create\nhibernate.show_sql=true\nhibernate.format_sql=true\nhibernate.use_sql_comments=true\n```\n\nEnabling MongoDB repositories\n-----------------------------\n\n* Open MongoConfig class and uncomment the following line:\n\n```\n// @EnableMongoRepositories(basePackageClasses = Application.class)\n```\n\nNow you can add repositories to your project:\n\n```\n@Repository\npublic interface MyRepository extends MongoRepository\u003cMyDocument, String\u003e {\n\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkolorobot%2Fspring-mvc-quickstart-archetype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkolorobot%2Fspring-mvc-quickstart-archetype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkolorobot%2Fspring-mvc-quickstart-archetype/lists"}