#On ubuntu :
sudo apt-get install spring
#On Centos : follow these steps:
1. download -
wget http://repo.spring.io/release/org/springframework/boot/spring-boot-cli/1.1.4.RELEASE/spring-boot-cli-1.1.4.RELEASE-bin.tar.gz
2. untar -
tar xzf spring-boot-cli-1.1.4.RELEASE-bin.tar.gz
3. cd extractedFolder/bin #or set bin folder on path
#Post setup we can use it as follows.
spring version #returns version of installed spring cli
spring init --list #returns list of available project-prototypes, description and dependencies list.
spring init --build=gradle -d=<PROJECT_ID_FROM_LIST> <PROJECT_PATH> #default build is maven. it creates folder(mentioned in PROJECT_PATH) structure and adds dependencies(required for project id) to it.
e.g- to create spring boot application with web-services and cassandra database access capabilities.
spring init --list | grep "cassandra\|web"
spring init --build=gradle -ddata-cassandra-reactive,web spring_web_cassandra_ex
spring-boot-microservices...
Problem-1: Spring 1.4 : Unable to start embeded default tomcat. Below is ref for specifying diff version of embeded server.
sol: spring.io, in a spring-boot-starter-web project if 'org.apache.hbase:hbase-server:0.98.6-cdh5.3.0' is used then above issue was faced as well. dropped hbase server dependency as it was not in use.
Problem-2: Caused by: java.lang.ClassNotFoundException: org.apache.kafka.streams.StreamsBuilder. using spring-kafka 2.1.5.RELEASE
sol:
One of the key components of Spring Framework is the Aspect oriented programming (AOP) framework. Aspect Oriented Programming entails breaking down program logic into distinct parts called so-called concerns. ref
Difference between @PathVariable & @PathParam.
dependencies {
compile("org.springframework.boot:spring-boot-devtools")
}
Example source codes:
spring-jdbc ,spring boot & angularjs SPA secured,
Spring-data-cassandra: add configuration class extending AbstractCassandraConfiguration annotated with enablecassandrarepositories > add repository interface extending CassandraRepository > add Entitiy class annotatted with @Table > add Accessor class that usesses repository...
Search Text: spring boot cli. create gradle project, create spring project, setup spring project.
Spring profiles. Sources: Tech Primers