Skip to content

Latest commit

 

History

History

hosting

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

HOSTING

RENDER.COM

  • create an account on the website and link it to github and gitlab

RUN SPRING BOOT APPLICATION AS A WINDOWS SERVICE

  • add this to pom.xml
<build>
    <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <executable>true</executable>
                </configuration>
            </plugin>
        </plugins>
</build>
  • maven clean

  • maven install

  • you will find jar file in target folder

  • Download in github winsw ,winsw repo the sample-minimal.xml and WinSWNet4.exe

  • copy this three file in one same folder

  • change sample-minimal.xml put in project name

  • put in project name

  • replace with

<!-- Path to the executable, which should be started -->
  <executable>java</executable>
  <arguments>-jar application_name.jar</arguments>
  • change sample-minimal name with WinSWNet4

  • launch

WinSWNet4.exe install //to install
WinSWNet4.exe uninstall //to uninstall
  • search in service to find him

VALIDATOR DEPENDENCIES

APPLICATION PROPERTIES

Application Properties support us to work in different environments. In this chapter, you are going to learn how to configure and specify the properties to a Spring Boot application.

we can keep separate properties file for each profile as shown belowapplication.properties

server.port = 8080
spring.application.name = demoservice
application-dev.properties

server.port = 9090
spring.application.name = demoservice
application-prod.properties

server.port = 4431
spring.application.name = demoservice

application.yml/application.yaml file

The application.properties file is not that readable. So most of the time developers choose application.yml file over application.properties file. YAML is a superset of JSON, and as such is a very convenient format for specifying hierarchical configuration data. YAML is more readable and it is good for the developers to read/write configuration files. For example, let’s pick some of the properties files that we have explained above, and let’s write them in YAML format.

CRUD

JpaRepository extends PagingAndSortingRepository which in turn extends CrudRepository.

Their main functions are:

Because of the inheritance mentioned above, JpaRepository will have all the functions of CrudRepository and PagingAndSortingRepository. So if you don't need the repository to have the functions provided by JpaRepository and PagingAndSortingRepository , use CrudRepository.

ADD CSS AND JS

  • create css and js folder in static

  • link it with

<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet" />