Java webapp developed with
Springboot (backend)
Thymeleaf (frontend)
mysql (database)
maven (buildtool)
application.properties
file at src\main\resources\application.properties
with the following contentspring.jpa.hibernate.ddl-auto=update
spring.datasource.url=<database url>
spring.datasource.username=<database username>
spring.datasource.password=<database password>
server.port=5000
Remember to replace the content in <>. Dont commit application.properties
to git as it contains sensitive information.
In a terminal, run
./mvnw spring-boot:run
This uses the mvnw script to build and run the jar.
Open localhost:5000 in a browser. The webapp's homepage should appear.
Build the Jar
./mvnw clean package
Upload the Jar to cloud
Source code is in src\main
Unit test will come soon!
Sample CSV to test inserting employees from CSV in src\test\java\com\example\demo\test_data
. Note: CSVs have to be saved as CSV(Comma delimited), else it wont work!
Future feature: add support for more csv file types.
Uses AWS
for Continuos Deployment.
CodePipeline has three main stages configured:
CodeBuild uses ./buildspec.yml
as the build script.
buildspec.yml
. The image is deployed in a docker container supplied by AWS.application.properties
file to build, but it is not committed to the public github repo that holds the source code as it contains sensitive information. The current workaround is to:
application.properties
in a private Github repo.application.properties
file from the private Github repo to the appropriate path within the synced source code.
curl https://$GITHUB_TOKEN@raw.githubusercontent.com/potatowagon/spring-application-properties/master/oppenheimer/application.properties -o ./src/main/resources/application.properties
./buildspec.yml
specifies to collect the jar file as the artifact.Codepipeline is configured in the AWS console to deploy the jar file to ElasticBeanstalk.
When deployment is successful AWS console will show that
CodePipeline deployment is successful
EBS is healthy