banco local spring app.properties code example

Example 1: application.properties spring boot mysql

spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/db_example
spring.datasource.username=springuser
spring.datasource.password=ThePasswordCopy

Example 2: add classpathresource messages.properties spring security

for internationalization : 
add 
  @Override
    public void configure(WebSecurity web) throws Exception {
        web
                .ignoring()
                .antMatchers("/resources/**", "/static/**", "/css/**", "/js/**", "/images/**");
    }
    
    and also for the login page an antMatchers with permitAll() : 
      @Override
    protected void configure(HttpSecurity http) throws Exception {

        http
                .authorizeRequests()
                .antMatchers("/login*")
                .permitAll()

Tags:

Java Example