blog-api
Spring MVC backend written in Java for my wiki/blog.
Why Spring?
Spring MVC and other parts of the Spring framework are still immensely popular despite its age. Sure, there are plenty of newer offerings. It would have been trivial making a Node.JS, Python Flask or Elixir API. Yet, Spring is still widely used by even the most up-to-date tech companies (See: FAANG).
However, when I pick up a new API framework in the future, then I will likely rewrite this one.
Tech Stack
- Spring MVC API
- Tomcat Web Server
- Microsoft SQL Server 2017
- Redgate Flyway for database migration
Development
If you would like to contribute, or use this as a template:
1. Clone the repo:
$ git clone https://github.com/J-Curragh/blog-api.git --branch=main --depth=1
2. Create application properties file:
# cd into project root
cd blog-api
# create application.properties
touch src/main/resources/application.properties
# resources/application.properties
---
spring.application.name = blog-api
spring.flyway.enabled = true
spring.flyway.user =
spring.flyway.password =
spring.flyway.baseline-on-migrate=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.show-sql=true
spring.datasource.url=jdbc:sqlserver://
:
;database=
spring.datasource.username=
spring.datasource.password=
spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
Note: It is generally recommended that you set-up a privileged login for Flyway, and an unprivileged login for Spring. See below as an example.
TODOs
- Include example of hardened Database permissions in README
- Finish basic API
- Implement Basic Authentication with tiered roles.