Initial commit: Spring Boot API with MySQL and Redis
This commit is contained in:
11
src/main/java/com/vrobot/api/SpringbootApiApplication.java
Normal file
11
src/main/java/com/vrobot/api/SpringbootApiApplication.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package com.vrobot.api;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class SpringbootApiApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(SpringbootApiApplication.class, args);
|
||||
}
|
||||
}
|
||||
34
src/main/resources/application.yml
Normal file
34
src/main/resources/application.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
spring:
|
||||
application:
|
||||
name: springboot-api
|
||||
datasource:
|
||||
url: jdbc:mysql://mysql:3306/devdb?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||
username: devuser
|
||||
password: p4fH5NB0y22ytwrB
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
jpa:
|
||||
hibernate:
|
||||
ddl-auto: update
|
||||
show-sql: true
|
||||
properties:
|
||||
hibernate:
|
||||
format_sql: true
|
||||
dialect: org.hibernate.dialect.MySQLDialect
|
||||
data:
|
||||
redis:
|
||||
host: redis
|
||||
port: 6379
|
||||
timeout: 2000ms
|
||||
server:
|
||||
port: 8080
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: health,info,metrics
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
logging:
|
||||
level:
|
||||
com.vrobot.api: DEBUG
|
||||
Reference in New Issue
Block a user