https://github.com/markelca/hui-api
Backend API using Spring Boot + Hibernate for the HUI social events management proyect.
https://github.com/markelca/hui-api
java-backend jpa-hibernate openapi3 rest-api spring-boot
Last synced: 19 days ago
JSON representation
Backend API using Spring Boot + Hibernate for the HUI social events management proyect.
- Host: GitHub
- URL: https://github.com/markelca/hui-api
- Owner: MarkelCA
- Created: 2022-02-24T14:08:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-09T14:51:45.000Z (about 3 years ago)
- Last Synced: 2025-02-11T11:52:24.041Z (5 months ago)
- Topics: java-backend, jpa-hibernate, openapi3, rest-api, spring-boot
- Language: Java
- Homepage:
- Size: 200 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hui-api
This is the server side REST API made for the HUI Proyect. Built with Spring Boot and Hibernate.### Stack of technologies used:






Postman API Reference: https://www.postman.com/hui-app
---
## Development Instalation
1. Copy the file `application.properties.sample` in the same folder *(app/src/main/resources)* and name it `application.properties`2. Change the following values for your enviroment ones.
- server.port
- spring.datasource.url
- spring.datasource.username
- spring.datasource.password
```properties
server.port=
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/?createDatabaseIfNotExist=true&useSSL=false
spring.datasource.username=
spring.datasource.password=
server.error.include-message=always
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false```
3. Run the application with the property `spring.jpa.hibernate.ddl-auto=create-drop` to create and populate the database, then change the value to `update` if you dont want to create the database each time it runs.
4. Also comment this three lines in the file `app/src/main/java/com/grupo5/huiapi/config/DBConfig.java` so it doesn't cause a conflict inserting the initial data.
```java
@Bean
CommandLineRunner commandLineRunner() {
return args -> {
//categoryRepository.saveAll( getInitialCategories() );
//userRepository.saveAll( getInitialUsers() );
//eventRepository.saveAll( getInitialEvents() );
};
}
```