This is a java/springboot and react project to be developed on.
It uses:
maven
to build the projectwebpack
to bundle the javascriptthymeleaf
for templatingflyway
to managepostgres
db migrations
REPLACE THIS TEXT WITH A LINK TO YOUR CARD WALL
This app uses a structure that is similar to Bookmark Manager. The biggest difference is that here, the repository
pattern is used. The repository pattern separates out the business logic of models from the responsibility of
connecting to the database and making queries. Take a look in the src/main/java/repository
and you'll find
PostRepository
which generates and executes queries to CRUD posts.
IMPORTANT: Test your understanding by diagramming the request/response cycles that occur when you load the app by visiting localhost:8080
This project will ultimately be really rewarding if you follow these three points:
- Work as a team. Don't be tempted to split up to learn solo. At the very least pair on learning, and share knowledge as a team.
- As a team, plan your learning. There's a ton of new things in this project, purposefully so. That's ok. As always with everything, take it slowly & in small steps: ask a coach if you want more ideas how to plan your team learning.
- As an individual, plan your learning. Use
Diode
to keep yourself focused on setting and achieving your learning goals.
- Fork and clone this repository to your machine
- Use an IDE, like
intellij
, and select the project directory to load into the editor (you may need to set the source folder in the project settings) - From the command line create a dev database
createdb acebook_springboot_development
- Install Maven
brew install maven
- Build the app and start the server, using the Maven command
mvn spring-boot:run
- Visit
localhost:8080
Flyway is being used to manage your database migrations. Use the flyway docs to become familiar how to migrate your data.
- This template application is hosted on heroku at https://springboot-react-template.herokuapp.com/
- Have a look at
application.properties
,application-dev.properties
andapplication-prod.properties
- The first line in
application.properties
specifies that the application is run using the config inapplication-dev.properties
. - The config in
application-dev.properties
specifies that the development datebase be used. - This ensures that you do not manipulate the production database whilst developing new features.
- Before deploying your application, you'll need to add some config to
application-prod.properties
so that the deployed application uses the production database. - Then, make sure the deployed app will use
application-prod.properties
by usingspring.profiles.active=dev
in your deployment script.
- to be configured