This is a web application that allows user to publish articles and to download them in different format including HTML, JSON and XML format. I developed this web application as part of an assessment for a Java Developer position at Cefalo in 2016, leading to a job offer from them. It can act as a good short tutorial for candidates anticpating similar positions in industry.
- /src/main/resources/ - contains client side code
- /src/main/resources/templates/ - contains HTML code
- /src/main/resources/static/ - contains CSS and necessary javascript code
- /src/main/java/com/cefalo/ - contains server-side code written in spring boot framework of java programming language
- Spring Boot has the charge of managing server side code
- In memory SQL database HSQLDB has been used for repository purpose. Data will not be persisted. So you will lose data every time you restart servlet conatiner.
- Maven used as build and dependency management tool
- Template engine Thyemleaf used for HTML rendering
- For UI design, Bootstrap and Font-awesome has been used
Please try not to use in lower version of following software's as I haven't tested this application on lower version of them
- Apache Maven(Version: 3.3.9)
- Apache Tomcat (Version: 8)
- JDK (Version: 1.8)
- Clone newsapp project in your machine
- Go to root directory of the project
- Open shell and type following command: ./mvnw clean package
- Go to target directory and copy newsapp.war
- Paste it to any servlet container. For Tomcat, paste it in webapps folder and start tomcat
- You should be able to access application in following URL: http://host:port/newsapp/news
- Landing page (http://host:port/newsapp/news) shows a list of all the story so far created
- To add a story, click Add Story menu from top nav bar or paste this URL: http://host:port/newsapp/news/addStory
- Clone newsapp project in your machine
- Go to root directory of the project
- Open shell and type following command: ./mvnw clean spring-boot:run
- Application will be deployed at default port 8080 (If available).
- If port 8080 is not available, you can run with port of your choice with command line arguments. For example, to run in port 9070, type: ./mvnw clean spring-boot:run -Drun.arguments="--server.port=9070"