-
Install the
.jar
file frompackages
on gitub -
After Installing usejava command run the generated SNAPSHOT.jar file -
java -jar NAME_OF_FILE.jar
-
Install the dependencies needed to run the application and also downloading SNAPSHOT of production application -
mvn install
-
After Installing using java command run the generated SNAPSHOT.jar file -
java -jar .\target\demo-0.0.1-SNAPSHOT.jar
- Directly run the
DemoApplication.java
to locally run the code and to publish changes as well
- GET
/api/v1/books
- Gets all Books from DB - GET
/api/v1/books/{bookId}
- Gets Book with specified ID from DB - POST
/api/v1/books
- Adds a new book in DB if it does not exists - DELETE
/api/v1/books/{bookId}
- Deletes a book in DB if it exists - PUT
/api/v1/books/{bookId}?bookName=...&author=...&publication=...&dop=...
- Updates a book in DB if it exists, not all parameters required
- After extracting from Spring Initializr, comment JPA until repository is not implemented
- Use
@RestController
and@RequestMapping
for defining path in Controller File. - Use
@Service
to set Service file as Service Func. - Use
@Autowired
in both Controller and Service for Dependency Injection - For Table in DB, use
@Table
and@Entity
and use necessary generators for different variables. - Use
@Repository
in repository file - in Config file, use
@Configuration
on class and@Bean
for method to add initial values in DB when running command - If we use
spring.jpa.hibernate.ddl-auto=create-drop
, then there is need for Config, else use,...=update
, to dont delete the DB Details when application reloads
- Change the REPOSITORY on
/{user}/.m2/settings.xml
and addOWNER
andGITHUB_TOKEN
- Add
Distrbution Management
inpom.xml