/forum

Internet forum powered by Spring Framework and MySQL

Primary LanguageJavaMIT LicenseMIT

Forum

Description

Internet forum [in this case about programming language Java] powered by Spring Framework and MySQL. This web application enables inter alia: adding topics and answers, as well as browsing, editing or deleting some of them.

Technologies

  • Java:
    • Spring Framework:
      • Spring MVC:
        • application-level on the basis on design pattern: model-view-controller
        • using methods "get" and "post" with parameterising URLs which is typical of REST API
      • Spring Data:
        • using JPQL and ready-made methods from JpaRepository to creating, reading, updating and deleting data
        • implementation of native queries
      • Spring Security:
        • own login form with authentication of users on the basis of database
        • restricting access to some pages for offline users
        • protection against cross-site request forgery
        • encoding passwords
      • Spring Boot:
        • automatic configuration and launching application
    • JPA & Hibernate:
      • specifying relations between entities in database and parameters of columns in tables
    • Java 8 SE:
      • Optionals, LocalDateTime
  • HTML:
    • Thymeleaf
    • data validation in login form and registration form
    • semantic elements from HTML5
  • CSS:
    • Materialize

Features

  • Possibility joining to the Java Forum and adding personal data to database: register
  • Summary of activity on forum expressed in number of topics or answers and hyperlinks to them: profile
  • Review topics with redirecting to each of them and to each of their authors: topics
  • Browsing a topic with the possibility of adding/deleting answer, and setting it as useful: topic

Software tools

  • IntelliJ IDEA 2017.2.4
  • Gradle 3.5.1
  • XAMPP [MySQL]

Project structure

build.gradle
│
└───src:
    ├───main:
    │   ├───java:
    │   │   └───com:
    │   │       └───plkpiotr:
    │   │           └───forum:
    │   │               │   ForumApplication.java
    │   │               │
    │   │               ├───configuration:
    │   │               │       AdditionalLoginConfiguration.java
    │   │               │       SecurityConfiguration.java
    │   │               │
    │   │               ├───controllers:
    │   │               │       AnswersController.java
    │   │               │       IndexController.java
    │   │               │       LoginController.java
    │   │               │       ProfileController.java
    │   │               │       RegisterController.java
    │   │               │       TopicController.java
    │   │               │       TopicsController.java
    │   │               │
    │   │               ├───entities:
    │   │               │       Answer.java
    │   │               │       Topic.java
    │   │               │       User.java
    │   │               │
    │   │               └───repositories:
    │   │                       AnswerRepository.java
    │   │                       TopicRepository.java
    │   │                       UserRepository.java
    │   │
    │   └───resources:
    │       │   application.properties
    │       │
    │       └───templates:
    │           │   answers.html
    │           │   error.html
    │           │   index.html
    │           │   login.html
    │           │   profile.html
    │           │   register.html
    │           │   topic.html
    │           │   topics.html
    │           │
    │           └───layout:
offline.htmlonline.html
    │
    └───test:
        └───java:
            └───com:
                └───plkpiotr:
                    └───forum:
                            ForumApplicationTests.java

Comments

The content of questions and answers on the screenshots comes from Stack Overflow. I was faced with those problems during creating application.

License

MIT