Sample archetype form Spring,Spring Security and JDBI3.
Require JDK 17+ AND Maven preinstalled.
generate sample project:
mvn archetype:generate -DarchetypeGroupId=com.github.kentyeh \
-DarchetypeArtifactId=springJdbiArch -DarchetypeVersion=4.0.3
-
Test Program
mvn test
-
Integration test
mvn integration-test
-
Test and generate document
mvn verify site
Final site report generated at target/site/index.html.
-
running program
mvn jetty:run
then open http://localhost:8080/{project.artifactId}/ to see the pages. In the meantime, the H2 database is available for connecting by jdbc:h2:tcp://localhost/{project.artifactId}
with sa/{project.artifactI}
-
Analysis your code problems after compiled.(by SpotBugs.)
mvn compile spotbugs:check spotbugs:gui
-
Deploy Web Application
mvn package
Find war file inner
${project.basedir}/target
folder, before deployment, It is required to build ajndi/${project.artifactId}
database resource in your web container.