Skip to content

Configuration Tips for Spring Boot: application.properties for Spring Boot Java

Notifications You must be signed in to change notification settings

carloscazelattojr/application.properties

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

application.properties

Dicas de configurações rápidas para Spring Boot Java, para vários bancos de dados.

h2 PostgreSql

Jpa

#Spring Boot server configuration
server.port=8000
server.servlet.context-path=/
 
# Database configuration
# ----------------------

#h2
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=root
spring.datasource.password=root

spring.jpa.database.platform=org.hibernate.dialect.H2Dialect

spring.h2.console.enabled=true
spring.h2.console.path=/h2-console


#PostgreSql-Local
spring.datasource.url=jdbc:postgresql://localhost:5432/db_jdev
spring.datasource.username=postgres
spring.datasource.password=1234567


#PostgreSQL Heroku configuration 

spring.datasource.driverClassName=org.postgresql.Driver
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=update

### Environment-dev
spring.datasource.url=jdbc:postgresql://host:port/database
spring.datasource.username=user
spring.datasource.password=pass

### Environment-prod
spring.datasource.url=jdbc:postgresql:${DATABASE_URL}


#MySql - INI ------------------------------------------------------------------------------
spring.datasource.url=jdbc:mysql://localhost:3306/sms?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false
spring.datasource.username=root
spring.datasource.password=root

#Hibernate
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect

#Hibernate auto dll
spring.jpa.hibernate.ddl-auto=update

#Show SQL
spring.jpa.show-sql=true

logging.level.org.hibernate.SQL=debug
#MySql - End ------------------------------------------------------------------------------



#Jpa Config
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.hibernate.ddl-auto=update 


#jwt
forum.jwt.secret=rm'!@N=Ke!~p8VTA2ZRK~nMDQX5Uvm!m'D&]{@Vr?G;2?XhbC:Qa#9#eMLN\}x3?JR3.2zr~v)gYF^8\:8>:XfB:Ww75N/emt9Yj[bQMNCWwW\J?N,nvH.<2\.r~w]*e~vgak)X"v8H`MH/7"2E`,^k@n<vE-wD3g9JWPy;CrY*.Kd2_D])=><D?YhBaSua5hW%{2]_FVXzb9`8FH^b[X3jzVER&:jw2<=c38=>L/zBq`}C6tT*cCSVC^c]-L}&/
forum.jwt.expiration=86400000
-------------

# actuator
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
info.app.name=@project.name@
info.app.description=@project.description@
info.app.version=@project.version@
info.app.encoding=@project.build.sourceEncoding@
info.app.java.version=@java.version@
----------------------------------------------------

About

Configuration Tips for Spring Boot: application.properties for Spring Boot Java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages