Académique Documents
Professionnel Documents
Culture Documents
Configuration (cont)
Core
spring-core
@Bean
spring-context
spring-expression
AOP and Instrumentation
Annotation that acts like a provider where you can define how
spring-beans
singletons.
spring-aop
spring-aspects
spring-instrument
spring-instrument-tomcat
Messaging
spring-messaging
Data Access/Integration
spring-jdbc
System properties
System.getProperties()
spring-tx
Environment Variable
export PROJECT_NAME=Test
External properties/yml
project.name=Test
spring-orm
spring-oxm
file
spring-jms
Web
spring-web
spring-webmvc
spring-webmvc-portlet
spring-websocket
Test
spring-test
http://docs.spring.io/spring-framework/docs/current/springframework-reference/html/overview.html#overview-modules
http://start.spring.io
@RestController
@ModelAttribute
Intellij IDEA
resources.
@RequestMapping
project.name=Test
@ConditionalOnClass
Only available if
(Tomcat.class)
the Tomcat
class is found in
the classpath.
Configuration
@Configuration
@ConditionalOnProperty
Annotation used to provide configurations.
@ConditionalOnPrope
Only available if
rty(name =
the property
"tomcat.version",
matchIfMissing =
tomcat.versi
on is set to true.
true)
Auto configuration is just the combination of@Configuration and
@Conditional* annotations in order to correctly register beans.
By danielfc
Sponsored by CrosswordCheats.com
cheatography.com/danielfc/
Page 1 of 2.
http://crosswordcheats.com
Profile
spring.profiles.active
@Profile("!dev")
Dependency Injection
@Resource
@ComponentScan
@Qualifier
application @Configuration.
@SpringBootApplication annotation.
@Component
@Controller
@Repository
@Service
Sponsored by CrosswordCheats.com
cheatography.com/danielfc/
Page 2 of 2.
http://crosswordcheats.com