{"id":14983007,"url":"https://github.com/reljicd/spring-boot-blog","last_synced_at":"2025-09-14T22:20:40.950Z","repository":{"id":94100530,"uuid":"92825513","full_name":"reljicd/spring-boot-blog","owner":"reljicd","description":"Simple blog web app made using Spring Boot + Thymeleaf","archived":false,"fork":false,"pushed_at":"2024-08-01T21:25:53.000Z","size":120,"stargazers_count":189,"open_issues_count":1,"forks_count":92,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-31T18:19:36.692Z","etag":null,"topics":["bash","bash-script","blog","docker","h2","h2-database","java","java8","optional","shell","shell-script","spring","spring-boot","spring-data-jpa","spring-data-rest","spring-mvc","spring-security","springboot","thymeleaf"],"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/reljicd.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-05-30T11:21:14.000Z","updated_at":"2024-12-09T20:36:43.000Z","dependencies_parsed_at":"2024-09-24T11:00:28.296Z","dependency_job_id":null,"html_url":"https://github.com/reljicd/spring-boot-blog","commit_stats":{"total_commits":34,"total_committers":1,"mean_commits":34.0,"dds":0.0,"last_synced_commit":"ad754f162b0140cc1f81bea8c8cc9e8a35ce4001"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reljicd%2Fspring-boot-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reljicd%2Fspring-boot-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reljicd%2Fspring-boot-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reljicd%2Fspring-boot-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reljicd","download_url":"https://codeload.github.com/reljicd/spring-boot-blog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767236,"owners_count":20992548,"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":["bash","bash-script","blog","docker","h2","h2-database","java","java8","optional","shell","shell-script","spring","spring-boot","spring-data-jpa","spring-data-rest","spring-mvc","spring-security","springboot","thymeleaf"],"created_at":"2024-09-24T14:06:34.227Z","updated_at":"2025-04-08T03:14:20.998Z","avatar_url":"https://github.com/reljicd.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot Blog Demo\n\n## About\n\nThis is a demo project for practicing **Spring Boot + Thymeleaf**. \nThe idea was to build some basic blogging platform.\n\nIt was made using **Spring Boot**, **Spring Security**, **Thymeleaf**, **Spring Data JPA**, **Spring Data REST** and **Docker**. \nDatabase is in memory **H2**.\n\nThere is a login and registration functionality included.\n\nUser has his own blog page, where he can add new blog posts. \nEvery authenticated user can comment on posts made by other users.\nHome page is paginated list of all posts.\nNon-authenticated users can see all blog posts, but cannot add new posts or comment.\n\n![Screenshot 1](https://user-images.githubusercontent.com/7095876/37773737-ae6a8b56-2dde-11e8-8a7f-5f259695bdc9.png)\n\n![Screenshot 1](https://user-images.githubusercontent.com/7095876/37773767-bbcb292c-2dde-11e8-91f8-2a05fe84e05e.png)\n\n## Configuration\n\n### Configuration Files\n\nFolder **src/resources/** contains config files for **blog-demo** Spring Boot application.\n\n* **src/resources/application.properties** - main configuration file. Here it is possible to change admin username/password,\nas well as change the port number.\n\n## How to run\n\nThere are several ways to run the application. You can run it from the command line with included Maven Wrapper, Maven or Docker. \n\nOnce the app starts, go to the web browser and visit `http://localhost:8090/home`\n\nAdmin username: **admin**\n\nAdmin password: **admin**\n\nUser username: **user**\n\nUser password: **password**\n\n### Maven Wrapper\n\n#### Using the Maven Plugin\n\nGo to the root folder of the application and type:\n```bash\n$ chmod +x scripts/mvnw\n$ scripts/mvnw spring-boot:run\n```\n\n#### Using Executable Jar\n\nOr you can build the JAR file with \n```bash\n$ scripts/mvnw clean package\n``` \n\nThen you can run the JAR file:\n```bash\n$ java -jar target/blog-demo-0.0.1-SNAPSHOT.jar\n```\n\n### Maven\n\nOpen a terminal and run the following commands to ensure that you have valid versions of Java and Maven installed:\n\n```bash\n$ java -version\njava version \"1.8.0_102\"\nJava(TM) SE Runtime Environment (build 1.8.0_102-b14)\nJava HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)\n```\n\n```bash\n$ mvn -v\nApache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)\nMaven home: /usr/local/Cellar/maven/3.3.9/libexec\nJava version: 1.8.0_102, vendor: Oracle Corporation\n```\n\n#### Using the Maven Plugin\n\nThe Spring Boot Maven plugin includes a run goal that can be used to quickly compile and run your application. \nApplications run in an exploded form, as they do in your IDE. \nThe following example shows a typical Maven command to run a Spring Boot application:\n \n```bash\n$ mvn spring-boot:run\n``` \n\n#### Using Executable Jar\n\nTo create an executable jar run:\n\n```bash\n$ mvn clean package\n``` \n\nTo run that application, use the java -jar command, as follows:\n\n```bash\n$ java -jar target/blog-demo-0.0.1-SNAPSHOT.jar\n```\n\nTo exit the application, press **ctrl-c**.\n\n### Docker\n\nIt is possible to run **blog-demo** using Docker:\n\nBuild Docker image:\n```bash\n$ mvn clean package\n$ docker build -t blog-demo:dev -f docker/Dockerfile .\n```\n\nRun Docker container:\n```bash\n$ docker run --rm -i -p 8090:8090 \\\n      --name blog-demo \\\n      blog-demo:dev\n```\n\n##### Helper script\n\nIt is possible to run all of the above with helper script:\n\n```bash\n$ chmod +x scripts/run_docker.sh\n$ scripts/run_docker.sh\n```\n\n## Docker \n\nFolder **docker** contains:\n\n* **docker/blog-demo/Dockerfile** - Docker build file for executing blog-demo Docker image. \nInstructions to build artifacts, copy build artifacts to docker image and then run app on proper port with proper configuration file.\n\n## Util Scripts\n\n* **scripts/run_docker.sh.sh** - util script for running blog-demo Docker container using **docker/Dockerfile**\n\n## Tests\n\nTests can be run by executing following command from the root of the project:\n\n```bash\n$ mvn test\n```\n\n## Helper Tools\n\n### HAL REST Browser\n\nGo to the web browser and visit `http://localhost:8090/`\n\nYou will need to be authenticated to be able to see this page.\n\n### H2 Database web interface\n\nGo to the web browser and visit `http://localhost:8090/h2-console`\n\nIn field **JDBC URL** put \n```\njdbc:h2:mem:blog_simple_db\n```\n\nIn `/src/main/resources/application.properties` file it is possible to change both\nweb interface url path, as well as the datasource url.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freljicd%2Fspring-boot-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freljicd%2Fspring-boot-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freljicd%2Fspring-boot-blog/lists"}