Ask-Answers is a fullstack Redit - Stackoverflow Clone . this project is useful for learning and experimenting with Spring 5 , Spring Boot ,Spring Security , Thymeleaf and JPA.
The Application is implemented as a Spring Boot app running an embedded version of Tomcat. the data storage is H2 Database which is an in-memory database And MySql Database accessed via Spring JPA.
- Maven - Dependency Management
- JDK 11 - Java™ Platform, Standard Edition Development Kit
- Spring Boot - Framework to ease the bootstrapping and development of new Spring Applications
- Mysql - Open-Source Relational Database Management System
- git - Free and Open-Source distributed version control system
- Bootstrap - front-end open source toolkit
- thymeleaf - server-side Java template engine
- Spring Security -Spring Security is a powerful and highly customizable authentication and access-control framework
- Postman - API Development Environment (Testing Docmentation)
Front End Ui - springit-templates Spring Reddit Clone Layouts & Templates
Ask-Answer app uses an in-memory database (H2) seeded with a commandLineRunner. The h2 console is automatically exposed at http://localhost:1010/h2-console and it is possible to inspect the content of the database using the jdbc:h2:mem:testdb url.
A similar setup is provided for Mysql in properties file in case a persistent database configuration is needed.
first you need to create a local database[Schema] called askanswer using mysql command Line.
create database askanswer;
To deploy the sample application to OpenShift you can use the OpenShift CLI:
oc new-app codecentric/springboot-maven3-centos~https://github.com/Urodacus/ask-answer-app
This will create:
- An ImageStream called "springboot-maven3-centos"
- An ImageStream called "askanswerapp"
- A BuildConfig called "askanswerapp"
- DeploymentConfig called "askanswerapp"
- Service called "askanswerapp"
If you want to access the app from outside your OpenShift installation, you have to expose the askanswerapp service:
oc expose askanswerapp --hostname=www.example.com
you can check these links :
Build Spring Boot Project with Maven mvn install / mvn clean install
run spring boot using maven : mvn spring-boot:run
or load it into your ide then run it.
access it via local host after configuring the port in properties file .
server.port = <<port number>>
The issue tracker is the preferred channel for bug reports, features requests and submitting pull requests.
- RESTful Web Service
- Bootstrap - CSS
- Web - Thymeleaf, JavaScript
- Spring Data JPA
- H2
- Spring AOP
- Spring boot Security
- Authentication
- Actuator
- MySql Configuration
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request