Spring 120 Boot Initilizr
Spring 120 Boot Initilizr
Septembre 2021
*Réussir la transformation. Ensemble.
http://start.spring.io/
2
Induced to evolve ?
STS : Spring Starter Project
3
Spring Starter Project
Note :
no check box for test,
or log4j ?
=> spring-test is
automatically added.
4
Installing
Generated Maven Project =>
5
Setup Preferred way
Maven Project with BOM (no pom parent anymore)
6
Other Spring-Boot Starters
7
Spring Boot Starters
Make your choice ! You can simply hit ctrl-space in the POM editor and type ''spring-boot-
starter'' for a complete list.
spring-boot-starter spring-boot-starter-jersey
spring-boot-starter-actuator spring-boot-starter-jta-atomikos
spring-boot-starter-amqp spring-boot-starter-jta-bitronix
spring-boot-starter-aop spring-boot-starter-mail
spring-boot-starter-batch spring-boot-starter-mobile
spring-boot-starter-cloud-connectors spring-boot-starter-mustache
spring-boot-starter-data-elasticsearch spring-boot-starter-redis
spring-boot-starter-data-gemfire spring-boot-starter-security
spring-boot-starter-data-jpa spring-boot-starter-social-facebook
spring-boot-starter-data-mongodb spring-boot-starter-social-linkedin
spring-boot-starter-data-rest spring-boot-starter-social-twitter
spring-boot-starter-data-solr spring-boot-starter-test
spring-boot-starter-freemarker spring-boot-starter-thymeleaf
spring-boot-starter-groovy-templates spring-boot-starter-velocity
spring-boot-starter-hateoas spring-boot-starter-web
spring-boot-starter-hornetq spring-boot-starter-websocket
spring-boot-starter-integration spring-boot-starter-ws
spring-boot-starter-jdbc
8
SPRING BOOT CONFIGURATION
STARTER
9
Spring Tools Suite STS
Help
Demo/Exercize
And STS would also add Hibernate and many other jars !
11 Nom de la présentation
SPRING BOOT CONFIGURATION
EMBEDDED DB
Embedded DB conf
if you define a dep with data-jpa you need a DB:
12
SPRING BOOT CONFIGURATION
OR A FULL EXTERNAL DB =>
Real DB conf : the starter JPA requires either the driver of an embedded DB
or the DB driver + the following properties ( user + pwd+ db-url ) from
application.properties
13
Spring Boot Starters
14
Induced to evolve ?
STS Starter Project
url :
15
Spring BOOT
LogBack loggers
16
Spring BOOT
LogBack loggers
17
AUTO-CONFIGURATION-REPORT
v2+
18
AUTO-CONFIGURATION-REPORT
In Spring-Boot 2.1.4
Just add the properties debug= true in your application.propert
19
BOOT MAVEN
Boot centralized params for choosing : JDK version and encoding
maven.compiler.source
maven.compiler.target
20
Default Maven behavior
JDK and source file encoding
21
Spring Boot factorized JDK and encoding properties
Boot as a maven parent
java.version is NOT a default Maven property • this default value should be overriden
to use a JDK8 for example
• project.build.sourceEncoding does not
need any override if you set your
eclipse editor to UTF-8 (default is cp-
in the parent 1252)
22
Spring Boot factorized JDK and encoding properties
no Boot parent
If your prefer not to have a boot parent and use the dep Management
strategy (as below), you loose your boot parent and so you also loose the
the <java.version> factorized property.
In that case, you should set those properties as in usual non-boot maven
properties :
for example using the standard maven compiler properties :
23