O GoConqr está de visual novo! Conte para nós o que você achou.

Mapa mental

Spring configuration

Felipe Malfatti Português

Conteúdo do mapa

Spring configuration

  1. To obtain Environment variables

    • You can Inject Environment with @Autowired
      • and call environment.getProperty("PROP_NAME")
    • You can use @Value annotation
      • can be use in fields or methos parameters
      • @Value("${environmentName}")
  2. @Profile

    • Method
    • Class
    • Multiples profiles can be active
    • is equivalent to profile attribute on <beans> tag, <beans> tags can be nested
      • Profile attribute not work on tag <bean>
  3. @Configuration

    • Defines a configuration class
    • Are subclassed at startup-time with CGLIB
      • Configuration class should not be final
    • You can use @Import
      • To split @Configurations in multiples class
    • @PropertySource
      • Additional property sources
      • @Configuration @PropertySource("classpath:/com/exampleconfig/application.properties") public class ApplicationConfiguration {
    • Can be mixed with @ComponentScan
      • But component scanning can work without @Configuration
        • <context:component-scan base-package="br.com.softplan">
  4. Spring Expression language (SPEL)

    • can be used in @Value annotation values
    • ${} is for properties
    • #{} is for SpEL
    • Access property of bean #{beanName.property}
    • systemProperties
    • systemEnvironment
    • Used in spring Security and batch
  5. @EnableAutoConfguration

    • Springboot automatically attempts to configure yout application based on the jar dependencies that you have added
      • You should only ever add one @SpringBootApplication or @EnableAutoConfiguration annotation.
        • in your main class with @Configuration

Informações

Descrição
Mapa Mental sobre Spring configuration, criado por Felipe Malfatti em 16-04-2018.
Criado por
Felipe Malfatti
Visualizações
0
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?