Intro
https://microservices.io/
https://javabrains.io/topics/
https://www.youtube.com/channel/UCYt1sfh5464XaDBH0oH_o7Q
Microservices is mainly for Continous Delivery
annotation is part of a compilation.
Sprint boot is a wrapper on Spring
Spring is a framework EJB is a specification
hibernate(RedHat) is not std so jpa came(specification)
the container is a pre-written program provides below feature
1.life cycle management
2.declarative services(txn,security,cache ,logging,exception handling etc) pattern used proxy
3.Distribute env or remoting (Protocols)
Lightweight means small life cycle
IOC,DI(Dependency Injection) & AOP(pointcut)
Spring Life cycle comes with 8 steps
1,2,3,5,6,7 are bean specific 6 and 7 we can ignore
4,8 post processor are not optional .power of spring relies on this steps
there are inbuild and custome post processors
jsr 250 class common annotationbeanpostprocessor
class autowiredannotaionbeanpostprocessor
Bean Post Processors:
this are special beans registered to the factory as part of life cycle all the bans must go through the post processors
spring life cycle uses builder pattern t construct bean
So spring boot came to remove this MVC(Above one)
Setting java path and variable
To start spring-boot
https://start.spring.io/
any changes will reboot the application
spring boot is mainly rest
@Configuration->@bean (Pojo)
@componentscan-> @component(AOP)
@controller(PT)
@service(BT)
@repository(DT)
@EnableAutoConfiguration(EnableJms,EnableTransactionManagement,EnableWebMVC)
OOAD---->OCP(Open CLose Programme)
Any application closed for modification open for extension
@Decorateor
---------------------------
yml
follows hierarchy json. PERFORMANCE ALSO SUPER
server
port
http . its like server.port.http
----------------------------------------
use rest template to use one service in one server to another service is a different server
-------------------------------------------------------------------------------------
spring is mainly of setter and constructor injection
@autowired is similar to interface injection
----------------------------------
Service Registry
Tools: Apache zookeeper, Netflix, Consul
MOcroservceis->Spring, Spring Boot, Spring cloud Netflix components
cloud-native application or platform
to get the advantage of cloud computing model the application must have 4 characteristics
1.devops.
2.continous delivery
3.micro services
4.contaionarization(locker,gorden)
maven package: wi;; create a jar of the project in the workspace
maven install: generate files in maven repository
to enable actuator we need the below dependencies
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
----------------------------------
management:
endpoints:
web:
exposure:
include:
heapdump,metrics,info,health,shutdown,threaddump,env
endpoint:
shutdown:
enabled: true
--------------------------------------------------------------
Hateoas(hypermedia as the engine of application sate) is a constraint of the rest application architecture
a hypermedia driven site provides information to navigate the sites rest interace
dynamically by including hypermedia links with the responses
------------------------------------------------------------------------------
rest documentation
swagger ---mainly used
post man---mainly used
hateoas---for spring boot, makes navigation easy in spring boot
wadl
------------------------------------------------------------------------------------
jms-> java messaging system
JMX->java management extension
-> mainly for runtime managment
jconsole is the management client application
mbean can be managed at run time
---------------------------------
garbage collector-> identifies live/reference objects and rest it will sweep.
https://javabrains.io/topics/
https://www.youtube.com/channel/UCYt1sfh5464XaDBH0oH_o7Q
Microservices is mainly for Continous Delivery
annotation is part of a compilation.
Sprint boot is a wrapper on Spring
Spring is a framework EJB is a specification
hibernate(RedHat) is not std so jpa came(specification)
the container is a pre-written program provides below feature
1.life cycle management
2.declarative services(txn,security,cache ,logging,exception handling etc) pattern used proxy
3.Distribute env or remoting (Protocols)
Lightweight means small life cycle
IOC,DI(Dependency Injection) & AOP(pointcut)
Spring Life cycle comes with 8 steps
- Instantiate
- populate propertie
- beanname awares setbeanName()
- Bean FactoryAwares's setBeanFactory()
- Pre-initialization Bean Post processors
- InitializingBeans afterPropertiesSet()
- Call custom init-methos
- post initialization beanpostprocessors
1,2,3,5,6,7 are bean specific 6 and 7 we can ignore
4,8 post processor are not optional .power of spring relies on this steps
there are inbuild and custome post processors
jsr 250 class common annotationbeanpostprocessor
class autowiredannotaionbeanpostprocessor
Bean Post Processors:
this are special beans registered to the factory as part of life cycle all the bans must go through the post processors
spring life cycle uses builder pattern t construct bean
builder ->is object scope (composition), creational, bean construction, some of the steps are optional
teamplete-> class inheritance(behavioral pattern), bean execution, all the steps are mandate
So spring boot came to remove this MVC(Above one)
Setting java path and variable
To start spring-boot
https://start.spring.io/
any changes will reboot the application
spring boot is mainly rest
@Configuration->@bean (Pojo)
@componentscan-> @component(AOP)
@controller(PT)
@service(BT)
@repository(DT)
@EnableAutoConfiguration(EnableJms,EnableTransactionManagement,EnableWebMVC)
OOAD---->OCP(Open CLose Programme)
Any application closed for modification open for extension
@Decorateor
---------------------------
yml
follows hierarchy json. PERFORMANCE ALSO SUPER
server
port
http . its like server.port.http
----------------------------------------
use rest template to use one service in one server to another service is a different server
-------------------------------------------------------------------------------------
spring is mainly of setter and constructor injection
@autowired is similar to interface injection
----------------------------------
Service Registry
Tools: Apache zookeeper, Netflix, Consul
MOcroservceis->Spring, Spring Boot, Spring cloud Netflix components
cloud-native application or platform
to get the advantage of cloud computing model the application must have 4 characteristics
1.devops.
2.continous delivery
3.micro services
4.contaionarization(locker,gorden)
maven package: wi;; create a jar of the project in the workspace
maven install: generate files in maven repository
to enable actuator we need the below dependencies
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
----------------------------------
management:
endpoints:
web:
exposure:
include:
heapdump,metrics,info,health,shutdown,threaddump,env
endpoint:
shutdown:
enabled: true
--------------------------------------------------------------
Hateoas(hypermedia as the engine of application sate) is a constraint of the rest application architecture
a hypermedia driven site provides information to navigate the sites rest interace
dynamically by including hypermedia links with the responses
------------------------------------------------------------------------------
rest documentation
swagger ---mainly used
post man---mainly used
hateoas---for spring boot, makes navigation easy in spring boot
wadl
------------------------------------------------------------------------------------
jms-> java messaging system
JMX->java management extension
-> mainly for runtime managment
jconsole is the management client application
mbean can be managed at run time
---------------------------------
garbage collector-> identifies live/reference objects and rest it will sweep.
rot johnson created spring
java persistance(JPA) with hibernet gavin kin
micro services by martin fowler
micro services by richerson
--------------------------------------------------------------------------------------------------
Comments
Post a Comment