Bean scopes in Spring Framework

Spring Bean scopesSet up the scopeThe @Scope annotation can be used@Scope("singleton")There are 6 scopes are available in the application contextsingleton This is the default scope.The same object is...
Home » Posts filed under spring boot
June 26, 2021 Ravi Yasas
Spring Bean scopesSet up the scopeThe @Scope annotation can be used@Scope("singleton")There are 6 scopes are available in the application contextsingleton This is the default scope.The same object is...
bean scope / beans / beginners / learning / prototype / request / scope / singleton / spring / spring boot / spring framework / tutorials
June 26, 2021 Ravi Yasas
Dependency injection What is Dependency injection?Dependency injection is a form of the IoC containerIt is just passing dependencies to other objects or frameworks.Dependency injection allows you to...
@Autowired / beginners / constructor / dependency injection / di / injection / ioc / ioc container / learning / setter / spring / spring boot / spring framework / tutorials
June 25, 2021 Ravi Yasas
Use jar not warIf you run mvn clean install in Spring Boot, you will get a fat jar file.It contains everything like dependencies, embedded web server... etc.You can just run java -jar jarFile in a JVM, the default is Tomcat embedded server or you can use Jetty.You don't need any web server or...
beginners / embedded server / jar / java / learning / spring boot / springboot / tomcat / tutorials / war
@OneToOne The best approach to bidirectional @OneToOne is to use @MapsId Student entity @Entity @Data @Table(name = "students") pu...