Skip to content

arvera/gradle-github-actions-example

 
 

Repository files navigation

Build the project

  1. From the root of the project gradlew build
  2. RESULT: it will produce a jar inside of: ./cnswapweb/build/libs/
  3. To build the docker container
    1. FOR MAC PLATFORM: docker build --build-arg JAR_FILE=build/libs/cnswapweb-0.0.1-SNAPSHOT.jar -t avera/cnswap .
    2. FOR x64: docker build --platform linux/amd64 --build-arg JAR_FILE=build/libs/cnswapweb-0.0.1-SNAPSHOT.jar -t avera/cnswap:0.0.1_linux .
  4. RESULT: it will produce a new container into the local docker registry: avera/swapy:latest
  5. To run the docker: docker run -p 8080:8080 avera/swapy

If you get an invalid username or password, is likely that the DB has not been initialized. Modify the application.properties to be: spring.sql.init.mode=always

Things to remember

@Controller classes serve as C from MVC. Note that the real controller in Spring MVC is DispatcherServlet that will use the specific @Controller class to handle the URL request.

@Service classes should serve for your service layer. Here you should put your business logic.

@Repository classes should serve for your data access layer. Here you should put CRUD logic: insert, update, delete, select.

@Service, @Repository and your entity classes will be M from MVC. JSP and other view technologies(e.g. JSP, Thymeleaf etc.) will conform V from MVC.

@Controller classes should only have access to @Service classes through interfaces. Similar, @Service classes should only have access to other @Service classes and for a specific set of @Repository classes through interfaces.

Wireframes

https://www.figma.com/file/BL4vBmvGUHMzRbmud9KcmJ/Figma-basics?type=design&node-id=1669-162202&mode=design&t=mFnSZBqeSXLrXO1m-0

Source in continued use for reference:

Sources used:

About

Explores the different ways to build Gradle projects using GitHub actions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 62.1%
  • Java 37.7%
  • Other 0.2%