Learning: security login, authentication and authorization
Set account and password
The first method: configuration file (not commonly used) application
spring.security.user.name=admin
spring.security.user.password=123
The second method: configure the class Need to inherit WebSecurityConfigurerAdapter
@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
...
Posted by Cheeky Chino on Sun, 02 Jan 2022 23:15:47 +0100
IOC (inversion of control) is used to control inversion and dependency (DI) injection
Create Maven project
Import dependent POM XML coordinate information:
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.0.2.RELEASE</version>
</dependency>
</dependencies>
<!--unit testing - ...
Posted by countcet on Sun, 02 Jan 2022 21:47:27 +0100
Liver! Spring JDBC persistence layer framework "family bucket" tutorial!
catalogue
Write in front
I. what is a JdbcTemplate?
2, JdbcTemplate framework construction
1. Import the required jar package
2. Configuring JDBC data sources
(1) . configure data sources directly in
(2) . import external configuration file
3. Configure the JdbcTemplate object
3, Detailed explanation of persistence layer operation
1. ...
Posted by VirusDoctor on Sun, 02 Jan 2022 21:27:49 +0100
Try to implement spring
prefaceIf you want to achieve the same effect, please keep consistent with the code in this article. The logic is not complex. After the effect is completed, you can modify it according to your own ideas. The code in this article is mainly implemented, and there must be some cases that have not been handled.causeA JAVA framework called Spring i ...
Posted by Frank H. Shaw on Sun, 02 Jan 2022 21:16:51 +0100
How does Spring solve the problem of circular dependency
1, What is circular dependency
Two or more objects refer to each other, i.e A rely on B,B rely on C,C Again dependent A
For example:
@service
public class A {
private B b;
@Autowired
public void setB(B b) {
this.b= b;
}
}
@service
public class B {
private A a;
@Autowired
public vo ...
Posted by sonnieboy on Sun, 02 Jan 2022 20:58:23 +0100
Shangyitong project record
Background management system
Upload hospital information interface
The first is the basic information of the hospital. On the background management website, the administrator can manage and operate some information of the hospital, such as hospital name, contact person, hospital number, etc
Specific technology:
swagger is integrated as ...
Posted by stylezeca on Sun, 02 Jan 2022 20:03:32 +0100
IoC and DI for Spring applications -- Implementation Based on XML
What is IoC and DI
IoC (inversion of control): in the abstract, it is an idea that all objects in our development process can be managed by Spring. We can obtain them directly without creating them ourselves, that is, the inversion of object management rights. Specifically, IoC is a container in Spring, a container for managing objects. DI (de ...
Posted by yendor on Sun, 02 Jan 2022 18:31:13 +0100
Spring framework advanced spring v2 0
1. The essence of IOC
Map container: the essence of IOC container is a map
ApplicationContext context: holds a reference to BeanFactory
Bean factory factory: responsible for obtaining beans from containers
BeanDefinitionReader parser: responsible for parsing all configuration files
Definition meta information configuration: xml, yml, ann ...
Posted by peppeto on Sun, 02 Jan 2022 15:47:05 +0100
Introduction to basic addition, deletion, modification and query of JdbcTemplate
preface
Recently contacted projects use JdbcTemplate so frequently that they often have to check the API. Here, write about the common operations of adding, deleting, modifying and checking.
Introduction to JdbcTemplate
JdbcTemplate is Spring's encapsulation of JDBC to make JDBC easier to use. It is a part of Spring, and we don't need relation ...
Posted by jonmkim on Sun, 02 Jan 2022 14:59:11 +0100
Function and introduction of RequestMapping annotation in spring MVC
Source code:
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Mapping
public @interface RequestMapping {
String name() default "";
@AliasFor("path")
String[] value() default {};
@AliasFor("value")
String[] path() default {};
RequestMethod[] method() default {};
Str ...
Posted by nonexist on Sun, 02 Jan 2022 13:05:46 +0100