struts:web layer , Relatively simple (ValueStack valuestack , Interceptor )

hibernate:dao layer , Knowledge is miscellaneous

spring:service layer , important , Use as much as you can --> 【 understand 】

 

spring day01: Basics (IoC Inversion of control 、DI Dependency injection )、 Integrate Junit、 Integrate web

spring day02:AOP Faceted programming 、JdbcTemplate

spring day03: Business management 、SSH Integrate

 

 

  1. spring The framework outlined

    1. What is? spring

  • Spring It's an open source framework ,Spring Is in the 2003 A lightweight that emerged in 1997 Java Development framework ,

    from Rod Johnson His works are in Expert One-On-One J2EE Development and Design Some of the ideas and archetypes described in the .

    It is created to solve the complexity of enterprise application development . One of the main advantages of the framework is its layered architecture ,

    Layered architecture allows users to choose which component to use , Also for J2EE Application development provides an integrated framework .

    Spring Use basic JavaBean To finish before it could only be done by EJB Things done . However ,Spring Is not limited to server-side development .

    From simplicity 、 In terms of testability and loose coupling , whatever Java Applications can be accessed from Spring Benefit from .

    Spring At its core is inversion of control (IoC) And face the facet (AOP). Simply speaking ,

    Spring It's a layer JavaSE/EE full-stack( "One-stop" work style ) Lightweight open source framework .

  • Lightweight : And EJB contrast , Less dependence on resources , Less resources to destroy .
  • layered : "One-stop" work style , Solutions provided by each layer

    web layer :struts,spring-MVC

    service layer :spring

    dao layer :hibernate,mybatis , jdbcTemplate --> spring-data

 

  1. spring origin

  • Expert One-to-One J2EE Design and Development
  • Expert One-to-One J2EE Development without EJB

 

  1. spring The core

  • Spring The core is Inversion of control (IoC) and Face to face (AOP)

 

  1. spring advantage

  • Easy decoupling , Simplify the development
    ( High cohesion and low coupling )
    • Spring It's a big factory ( Containers ), You can create and maintain all objects and dependencies , hand Spring management
    • spring The factory is used to generate bean
  • AOP Programming support
    • Spring Provide aspect oriented programming , It is convenient to intercept the permission of the program 、 Operation monitoring and other functions
  • Support for declarative transactions
    • Transactions can be managed through configuration alone , Without manual programming
  • Convenient program testing
    • Spring Yes Junit4 Support , It's easy to test with annotations Spring Program
  • Easy integration of various excellent frameworks
    • Spring Do not exclude various excellent open source frameworks , It provides various excellent frameworks ( Such as :Struts、Hibernate、MyBatis、Quartz etc. ) Direct support for
  • Reduce JavaEE API The difficulty of using
    • Spring Yes JavaEE Some very difficult to use in development API(JDBC、JavaMail、 Remote call, etc ), Package is available , To make these API The difficulty of application is greatly reduced

 

  1. spring Architecture

Core container :beans、core、context、expression

 

 

  1. Introductory cases :IoC【 master 】

    1. Import jar package

  • 4 + 1 : 4 Core (beans、core、context、expression) + 1 Dependencies (commons-loggins...jar)

 

  1. Target class

  • Provide UserService Interface and implementation classes
  • get UserService Instance of implementation class

     Previously under development , direct new One object can be .

     Study spring after , Will be made by Spring Create an object instance --> IoC Inversion of control (Inverse of Control)

         When an instance object is needed later , from spring factory ( Containers ) gain , You need to configure the fully qualified name of the implementation class to xml In file

public
interface UserService {

    

    public
void addUser();

 

}

 

public
class UserServiceImpl implements UserService {

 

    @Override

    public
void addUser() {

        System.out.println("a_ico add user");

    }

 

}

 

  1. The configuration file

  • Location : arbitrarily , In development, it is usually in classpath Next (src)
  • name : arbitrarily , Commonly used in development applicationContext.xml
  • Content : add to schema constraint

     Constraint file location :spring-framework-3.2.0.RELEASE\docs\spring-framework-reference\html\ xsd-config.html

<?xml
version="1.0"
encoding="UTF-8"?>

<beans
xmlns="http://www.springframework.org/schema/beans"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.springframework.org/schema/beans

                     http://www.springframework.org/schema/beans/spring-beans.xsd">

    <!-- To configure service

        <bean> Configure the objects that need to be created

            id : Used later from spring The container gets the instance using

            class : The fully qualified class name of the instance needs to be created

    -->

    <bean
id="userServiceId"
class="com.itheima.a_ioc.UserServiceImpl"></bean>

</beans>

 

 

  1. test

@Test

    public
void demo02(){

        // from spring Containers get

        //1 Get the container

        String xmlPath = "com/itheima/a_ioc/beans.xml";

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlPath);

        //2 Get content -- You don't need to be new, from spring Containers get

        UserService userService = (UserService) applicationContext.getBean("userServiceId");

        userService.addUser();

        

    }

 

  1. Introductory cases :DI【 master 】

  • DI Dependency Injection , Dependency injection

    is a : It's a , Inherit .

    has a: There is one , Member variables , rely on .

        class B {

private A a; //B Class dependence A class

}

     rely on : One object needs to use another object

     Inject : adopt setter Method to set another object instance .

  • for example :

    class BookServiceImpl{

// Developed before : Interface = Implementation class (service and dao coupling )

        //private BookDao bookDao = new BookDaoImpl();

        //spring after ( decoupling :service Implementation class use dao Interface , I don't know the specific implementation class )

        private BookDao bookDao;

        setter Method

}

     simulation spring Execution process

     establish service example :BookService bookService = new BookServiceImpl()        -->IoC <bean>

     establish dao example :BookDao bookDao = new BookDaoImple()                -->IoC

     take dao Set to service:bookService.setBookDao(bookDao);                -->DI <property>

 

  1. Target class

  • establish BookService Interface and implementation classes
  • establish BookDao Interface and implementation classes
  • take dao and service To configure xml file
  • Use api test
  1. dao

public
interface BookDao {

    

    public
void addBook();

 

}

public
class BookDaoImpl implements BookDao {

 

    @Override

    public
void addBook() {

        System.out.println("di add book");

    }

 

}

 

 

  1. service

public
interface BookService {

 

    public
abstract
void addBook();

 

}

public
class BookServiceImpl implements BookService {

    

: Before , Interface = Implementation class

//    private BookDao bookDao = new BookDaoImpl();

: Interface + setter

    private BookDao bookDao;

    public
void setBookDao(BookDao bookDao) {

        this.bookDao = bookDao;

    }

    

    @Override

    public
void addBook(){

        this.bookDao.addBook();

    }

 

}

 

 

  1. The configuration file

 

<beans
xmlns="http://www.springframework.org/schema/beans"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.springframework.org/schema/beans

                     http://www.springframework.org/schema/beans/spring-beans.xsd">

    <!--

     simulation spring Execution process

         establish service example :BookService bookService = new BookServiceImpl()    IoC <bean>

         establish dao example :BookDao bookDao = new BookDaoImpl()            IoC

         take dao Set to service:bookService.setBookDao(bookDao);        DI <property>

        

        <property> For property Injection

            name: bean The property name , adopt setter Methods to get

                setBookDao ##> BookDao ##> bookDao

            ref
: the other one bean Of id The value of the reference

     -->

 

    <!-- establish service -->

    <bean
id="bookServiceId"
class="com.itheima.b_di.BookServiceImpl">

        <property
name="bookDao"
ref="bookDaoId"></property>

    </bean>

    

    <!-- establish dao example -->

    <bean
id="bookDaoId"
class="com.itheima.b_di.BookDaoImpl"></bean>

    

 

</beans>

 

 

  1. test

    @Test

    public
void
demo01(){

        // from spring Containers get

        String xmlPath = "com/itheima/b_di/beans.xml";

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlPath);

        BookService bookService = (BookService) applicationContext.getBean("bookServiceId");

        

        bookService.addBook();

        

    }

 

  1. myeclipse schema xml Tips

  • Step one : determine xsd file location

    spring-framework-3.2.0.RELEASE\schema\beans

    

  • Step two : Copy path

    

  • Step three : Search for "xml catalog"

    

 

  • Step four : Add constraint tips

    

 

  1. The core API

  • api Overall understanding , Do not use after , In the process of learning, we need .

  • BeanFactory : This is a factory , Used to generate arbitrary bean.

     Take delay load , for the first time getBean Will be initialized Bean

  • ApplicationContext: yes BeanFactory Sub interface of , More powerful .( International processing 、 events 、Bean Automatic assembly 、 For different application layers Context Realization ). When the configuration file is loaded , Just instantiate the object .

    ClassPathXmlApplicationContext Used for loading classpath( Class path 、src) Under the xml

         load xml Operating position --> /WEB-INF/classes/...xml

    FileSystemXmlApplicationContext Used to load... Under the specified drive letter xml

         load xml Operating position --> /WEB-INF/...xml

             adopt java web ServletContext.getRealPath() Get the specific drive

 

    @Test

    public
void demo02(){

        // Use BeanFactory -- For the first time getBean Instantiation

        String xmlPath = "com/itheima/b_di/beans.xml";

        

        BeanFactory beanFactory = new
XmlBeanFactory(new ClassPathResource(xmlPath));

        

        BookService bookService = (BookService) beanFactory.getBean("bookServiceId");

        

        bookService.addBook();

        

    }

 

 

 

  1. assembly Bean be based on XML

    1. Instantiation method

  • 3 Kind of bean Instantiation method : Default structure 、 Static factory 、 Instance factory
  •  

 

  1. Default structure

<bean id="" class=""> You must provide a default construct

 

  1. Static factory

  • Often used with spring Integrate other frameworks ( Tools )
  • Static factory : Used to generate instance objects , All methods must be static

<bean id="" class=" Factory fully qualified class name " factory-method=" Static methods ">

 

  1. factory

public
class MyBeanFactory {

    

    /**

     * Create examples

     * @return

     */

    public
static UserService createService(){

        return
new UserServiceImpl();

    }

}

 

  1. spring To configure

    <!-- Give the instance created by the static factory to spring

        class Determine the static factory fully qualified class name

        factory-method Determine the static method name

    -->

    <bean
id="userServiceId"
class="com.itheima.c_inject.b_static_factory.MyBeanFactory"
factory-method="createService"></bean>

 

  1. Instance factory

  • Instance factory : You must first have a factory instance object , Create objects from instance objects . All the ways to provide it are " The static " Of .

 

  1. factory

/**

* Instance factory , All methods are not static

*

*/

public
class MyBeanFactory {

    

    /**

     * Create examples

     * @return

     */

    public UserService createService(){

        return
new UserServiceImpl();

    }

 

}

 

  1. spring To configure

    <!-- Create a factory instance -->

    <bean
id="myBeanFactoryId"
class="com.itheima.c_inject.c_factory.MyBeanFactory"></bean>

    <!-- get userservice

        * factory-bean Identify factory examples

        * factory-method Identify common methods

    -->

    <bean
id="userServiceId"
factory-bean="myBeanFactoryId"
factory-method="createService"></bean>

    

 

 

  1. Bean species

  • Ordinary bean: The previous operations were all ordinary bean.<bean id="" class="A"> ,spring Create directly A example , And back to
  • FactoryBean: It's a special one bean, Ability to generate objects in the factory , Only specific objects can be generated .

    bean You have to use FactoryBean Interface , This interface provides methods getObject() Used to obtain specific bean.

    <bean id="" class="FB"> First create FB example , Use call getObject() Method , And return the return value of the method

        FB fb = new FB();

        return fb.getObject();

  • BeanFactory and FactoryBean contrast ?

    BeanFactory: factory , Used to generate arbitrary bean.

    FactoryBean: special bean, Used to generate another specific bean. for example :ProxyFactoryBean , This factory bean For production agents .<bean id="" class="....ProxyFactoryBean"> Get proxy object instance .AOP Use

    

  1. Scope

  • Scope : Used to determine the spring establish bean The number of instances

    

  • Value :

    singleton Single case , The default value is .

    prototype Multiple cases , Every time getBean You will get an example . for example :struts Integrate spring, To configure action Multiple cases .

  • Configuration information

<bean id="" class="" scope=""> 

    

 

<bean
id="userServiceId"
class="com.itheima.d_scope.UserServiceImpl"

        scope="prototype"
></bean>

 

 

  1. Life cycle

    1. Initialization and destruction

  • Before and after the implementation of the target method , Will be initialized or destroyed .

<bean id="" class="" init-method=" Initialization method name " destroy-method=" Name of the method of destruction ">

 

  1. Target class

public
class UserServiceImpl implements UserService {

 

    @Override

    public
void addUser() {

        System.out.println("e_lifecycle add user");

    }

    

    public
void myInit(){

        System.out.println(" initialization ");

    }

    public
void myDestroy(){

        System.out.println(" The destruction ");

    }

 

}

 

  1. spring To configure

<!--

        init-method Used to configure initialization methods , Prepare data, etc

        destroy-method Used to configure destruction methods , Clean up resources, etc

    -->

    <bean
id="userServiceId"
class="com.itheima.e_lifecycle.UserServiceImpl"

        init-method="myInit"
destroy-method="myDestroy"
></bean>

 

  1. test

@Test

    public
void demo02() throws Exception{

        //spring factory

        String xmlPath = "com/itheima/e_lifecycle/beans.xml";

        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlPath);

        UserService userService = (UserService) applicationContext.getBean("userServiceId");

        userService.addUser();

        

        // requirement :1. The container must close, Destruction method execution ; 2. It has to be a one-off

//        applicationContext.getClass().getMethod("close").invoke(applicationContext);

        // * There is no definition... In this method interface , The implementation class provides

        applicationContext.close();

        

    }

 

  1. BeanPostProcessor post-processing Bean

  • spring Provide a mechanism , Just implement this interface BeanPostProcessor, And provide the implementation class to spring Containers ,

    spring The container will automatically execute , Execute... Before initializing the method before(), Execute after initializing method after() . To configure <bean class="">

    

  • Factory hook( hook ) that allows for custom modification of new bean instances, e.g. checking for marker interfaces or wrapping them with proxies.
  • spring Provide factory hook , Used to modify instance objects , Proxy objects can be generated , yes AOP Bottom .

simulation

A a =new A();

a = B.before(a)            --> take a The instance object of is passed to the post-processing bean, You can generate proxy objects and return .

a.init();

a = B.after(a);

 

a.addUser();        // Generate proxy objects , The purpose is to execute before and after the target method ( for example : Open transaction 、 Commit transaction )

 

a.destroy()

 

  1. Write the implementation class

public
class MyBeanPostProcessor implements BeanPostProcessor {

 

    @Override

    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {

        System.out.println(" First method
: " + beanName);

        return bean;

    }

 

    @Override

    public Object postProcessAfterInitialization(final Object bean, String beanName) throws BeansException {

        System.out.println(" Post method
: " + beanName);

        // bean Target audience

        // Generate
jdk
agent

        return Proxy.newProxyInstance(

                    MyBeanPostProcessor.class.getClassLoader(),

                    bean.getClass().getInterfaces(),

                    new InvocationHandler(){

                        @Override

                        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {

                            

                            System.out.println("------ Open transaction ");

                            

                            // Execution target method

                            Object obj = method.invoke(bean, args);

                            

                            System.out.println("------ Commit transaction ");

                            return obj;

                        }});

    }

}

 

  1. To configure

<!-- Register the postprocessing implementation class with spring -->

    <bean
class="com.itheima.e_lifecycle.MyBeanPostProcessor"></bean>

 

  • problem 1: post-processing bean Act on a target class , Or all the target classes ?

     all

  • problem 2: How to use only one ?

     adopt " Parameters 2"beanName Control

 

  1. Attribute dependency injection

  • Dependency injection : Manual assembly and Automatic assembly
  • Manual assembly : Generally, manual configuration information is used

     be based on xml assembly : Construction method 、setter Method

     Assemble... Based on annotations :

  • Automatic assembly :struts and spring Integration can automatically assemble

    byType: Assemble by type

    byName: Assemble by name

    constructor Construction assembly ,

    auto: Not sure about the assembly .

  1. Construction method

  1. Target class

public
class User {

    

    private Integer uid;

    private String username;

    private Integer age;

    

    public User(Integer uid, String username) {

        super();

        this.uid = uid;

        this.username = username;

    }

    

    public User(String username, Integer age) {

        super();

        this.username = username;

        this.age = age;

    }

    

 

  1. spring To configure

    <!-- Constructor injection

        * <constructor-arg> Used to configure a parameter of the constructor argument

            name : Name of parameter

            value: Set common data

            ref: Reference data , It's usually another bean id value

            

Start
. If only index , When multiple construction methods are matched , Use the first... By default .

            type : Determine the parameter type

         for example : Use the name name

            <constructor-arg name="username" value="jack"></constructor-arg>

            <constructor-arg name="age" value="18"></constructor-arg>

:【 type type and
Indexes index】

            <constructor-arg index="0" type="java.lang.String" value="1"></constructor-arg>

            <constructor-arg index="1" type="java.lang.Integer" value="2"></constructor-arg>

    -->

    <bean
id="userId"
class="com.itheima.f_xml.a_constructor.User"
>

        <constructor-arg
index="0"
type="java.lang.String"
value="1"></constructor-arg>

        <constructor-arg
index="1"
type="java.lang.Integer"
value="2"></constructor-arg>

    </bean>

  1. setter Method

<!-- setter Methods to inject

        * Common data

            <property name="" value=" value ">

             equivalent

            <property name="">

                <value> value

        * Reference data

            <property name="" ref=" the other one bean">

             equivalent

            <property name="">

                <ref bean=" the other one bean"/>

    

    -->

    <bean
id="personId"
class="com.itheima.f_xml.b_setter.Person">

        <property
name="pname"
value=" Yangzhi "></property>

        <property
name="age">

            <value>1234</value>

        </property>

        

        <property
name="homeAddr"
ref="homeAddrId"></property>

        <property
name="companyAddr">

            <ref
bean="companyAddrId"/>

        </property>

    </bean>

    

    <bean
id="homeAddrId"
class="com.itheima.f_xml.b_setter.Address">

        <property
name="addr"
value=" Funan "></property>

        <property
name="tel"
value="911"></property>

    </bean>

    <bean
id="companyAddrId"
class="com.itheima.f_xml.b_setter.Address">

        <property
name="addr"
value=" Babaoshan, Beijing "></property>

        <property
name="tel"
value="120"></property>

    </bean>

 

  1. P Command space [ understand ]

  • Yes "setter Methods to inject " Simplify , Replace <property name=" Property name ">, But in

    <bean p: Property name =" Common value " p: Property name -ref=" Reference value ">

  • p Namespace usage prerequisites , Namespace... Must be added

    

 

    <bean
id="personId"
class="com.itheima.f_xml.c_p.Person"

        p:pname=" Yu Taipu "
p:age="22"

        p:homeAddr-ref="homeAddrId"
p:companyAddr-ref="companyAddrId">

    </bean>

    

    <bean
id="homeAddrId"
class="com.itheima.f_xml.c_p.Address"

        p:addr="DG"
p:tel=" dongguan ">

    </bean>

    <bean
id="companyAddrId"
class="com.itheima.f_xml.c_p.Address"

        p:addr="DG"
p:tel=" island country ">

    </bean>

 

  1. SpEL[ understand ]

  • Yes <property> Do unified programming , All content uses value

    <property name="" value="#{ expression }">

    #{123}、#{'jack'} : Numbers 、 character string

    #{beanId}    : the other one bean quote

    #{beanId.propName}    : Operational data

    #{beanId.toString()}    : Execution method

    #{T( class ). Field | Method }    : Static methods or fields

 

    <!--

        <property name="cname" value="#{'jack'}"></property>

        <property name="cname" value="#{customerId.cname.toUpperCase()}"></property>

             Through another bean, Get attributes , Method called

        <property name="cname" value="#{customerId.cname?.toUpperCase()}"></property>

            ?. If the object is not null, Will call method

    -->

    <bean
id="customerId"
class="com.itheima.f_xml.d_spel.Customer"
>

        <property
name="cname"
value="#{customerId.cname?.toUpperCase()}"></property>

        <property
name="pi"
value="#{T(java.lang.Math).PI}"></property>

    </bean>

 

  • read :

    

  1. Set injection

<!--

         The injection of the set is all for <property> Add child tags

             Array :<array>

            List:<list>

            Set:<set>

            Map:<map> ,map Deposit k/v Key value pair , Use <entry> describe

            Properties:<props> <prop key=""></prop> 【】

            

         Common data :<value>

         Reference data :<ref>

    -->

    <bean
id="collDataId"
class="com.itheima.f_xml.e_coll.CollData"
>

        <property
name="arrayData">

            <array>

                <value>DS</value>

                <value>DZD</value>

                <value> Prick silk </value>

                <value> Loser in loser </value>

            </array>

        </property>

        

        <property
name="listData">

            <list>

                <value> Yu Songnan </value>

                <value> Zeng Wei </value>

                <value> Yang Yu </value>

                <value> Zeng Xiaoxian </value>

            </list>

        </property>

        

        <property
name="setData">

            <set>

                <value> Stop sealing </value>

                <value> Tissue paper </value>

                <value> Relationship </value>

            </set>

        </property>

        

        <property
name="mapData">

            <map>

                <entry
key="jack"
value=" jack "></entry>

                <entry>

                    <key><value>rose</value></key>

                    <value> shredded meat </value>

                </entry>

            </map>

        </property>

        

        <property
name="propsData">

            <props>

                <prop
key=" Grosvenor LTD handsome "> Well </prop>

                <prop
key=" Bai Fu beauty "> Ah </prop>

                <prop
key=" Male loser "> A kind of </prop>

            </props>

        </property>

    </bean>

 

 

  1. assembly Bean Based on annotations

  • annotation : It's a class , Use @ Annotated name
  • In development : Using annotations replace xml The configuration file .

 

 

1. @Component replace <bean class="">

    @Component("id") replace <bean id="" class="">

2.web Development , Provide 3 individual @Component Annotation derived annotation ( Function as ) replace <bean class="">

    @Repository :dao layer

    @Service:service layer

    @Controller:web layer

3. Dependency injection     , Set private fields , You can also give setter Method setting

     Common value :@Value("")

     Reference value :

         The way 1: according to 【 type 】 Inject

            @Autowired

         The way 2: according to 【 name 】 Inject 1

            @Autowired

            @Qualifier(" name ")

         The way 3: according to 【 name 】 Inject 2

            @Resource(" name ")

4. Life cycle

     initialization :@PostConstruct

     The destruction :@PreDestroy

5. Scope

    @Scope("prototype") Multiple cases

 

  • Comment on the premise of use , Add namespace , Give Way spring Scanning contains annotation classes

 

<beans
xmlns="http://www.springframework.org/schema/beans"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:context="http://www.springframework.org/schema/context"

xsi:schemaLocation="http://www.springframework.org/schema/beans

                     http://www.springframework.org/schema/beans/spring-beans.xsd

                     http://www.springframework.org/schema/context

                     http://www.springframework.org/schema/context/spring-context.xsd">

    <!-- Component scan , Scan for classes with annotations -->

    <context:component-scan
base-package="com.itheima.g_annotation.a_ioc"></context:component-scan>

</beans>

 

  1. requirement

Practice first :xml

    IoC

    DI

    xml To configure

         Instantiation method

         Scope

         Life cycle

         Attribute injection : Construction method 、setter、、 aggregate

Practice again : annotation

    web Development

(p Namespace 、SpEL)

 

 

Spring day01 More articles about notes

  1. Spring Security note :HTTP Basic authentication

    In the first section  Spring Security note :Hello World  On the basis of , Just put Spring-Security.xml A change of position in <http auto-config="true ...

  2. Spring day02 note

    spring day01 review Writing process ( be based on xml) 1. Import jar package :4+1 --> beans/core/context/expression | commons-logging 2. Compilation items ...

  3. 【Spring Learning notes -MVC-3.1】SpringMVC return Json data - The way 1- Expand

    <Spring Learning notes -MVC> Series articles , Back to json Data articles are shared 3 piece , Respectively : [Spring Learning notes -MVC-3]SpringMVC return Json data - The way 1:http://www ...

  4. ( turn ) Spring Reading notes -----Spring Of Bean The configuration depends on

    The previous blog introduced Spring Medium Bean The basic concept and scope of (Spring Reading notes -----Spring Of Bean And Bean Basic concepts of ), Now introduce Spring Bean Basic configuration . From the beginning we know Jav ...

  5. spring Entry notes ( One )

    Recent learning spring Deepen your understanding of spring The understanding of the , I also hope to share and discuss with you . One . download spring download spring It took a lot of effort , Not yet from spring Find the download portal on the official website , I'm from below ...

  6. struts2,hibernate,spring Integrate notes (3)

    struts2,hibernate,spring Integrate notes (1) struts2,hibernate,spring Integrate notes (2) Match well struts and hibernate It's about to start spring 了 Old rules , still ...

  7. struts2,hibernate,spring Integrate notes (2)

    Last words struts2,hibernate,spring Integrate notes (1) Let's move on End of configuration struts Then it's time to start hibernate Configuration of hibernate Our environment doesn't depend on web development environment , In my first configuration ...

  8. Spring Reading notes ——bean analysis

    Previous review Part 1 <Spring Reading notes --bean load > From a code point of view, we introduced which classes are responsible for parsing XML file , And how to step by step from XML Gestalt becomes familiar to us bean Of , until DefaultBeanDef ...

  9. Spring Reading notes ——bean establish ( On )

    adopt <Spring Reading notes --bean load > and <Spring Reading notes --bean analysis >, We learned two things . Spring How to load and digest a xml The configuration file Spring How to integrate xml ...

Random recommendation

  1. call sharepoint 2010 REST The newspaper version is too low

    Problem description : Wrote a webservice call sharepoint REST, The machine has been tested successfully , Report an error after deploying to the server (System.Data.Services.Client.DataServiceQuer ...

  2. Prick silk giser Growing up - Research one ( On )

    2011 After graduating from college in , I chose Baoyan GIS Graduate student , Continued my GIS Research career , Children's shoes of graduate school pay attention to , What kind of tutor to choose for postgraduate education is very important , Because different mentors have different connections , In a shallow sense , If the tutor has more development projects on hand , Just you yourself? ...

  3. javascript Method example

    Output the property name and value of the object : boj(o){ for(var p in o){ console.log(p + ":" + o[p] + "\n"); } } structure ...

  4. Android Programming: Pushing the Limits -- Chapter 2: Efficient Java Code for Android

    Android's Dalvik Java And Java SE Compare Java Code optimization Memory management and allocation Android Multithreading operation of Android’s Dalvik Java And Java SE ...

  5. 【《Objective-C Basic course 》 note ch05】( 6、 ... and )OC The compounding mechanism in Composition

     1. Composition is achieved by including an object pointer as an instance variable .        @interface Unicycle : NSObject        {           Pedal*pedal;     ...

  6. CentOS 6.7 install Hadoop 2.6.3 Cluster environment

    stay CentOS 6.7 x64 To build Hadoop 2.6.3 A fully distributed environment , And in DigitalOcean The test was successful . This paper assumes that : Master node (NameNode) domain name ( Host name ):m.fredlab.org ...

  7. Use Advanced Installer take .exe The program is repackaged as .msi Program

    original text : Use Advanced Installer take .exe The program is repackaged as .msi Program Use Advanced Installer take .exe The program is repackaged as .msi Program First installation Advanced instal ...

  8. Rich text editor UEditor How to configure and use

    Unzip the downloaded rich text editor file and put it in webcontent Next If In the document jsp Under folder controller.java If the document reports an error     will jsp Under the lib All the files in the folder are copied to  web-i ...

  9. LeetCode 280. Wiggle Sort ( Swing sort )$

    Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] < ...

  10. confirm Prompt pop up OK and cancel button

    js----> var con = confirm(' This is a confirmation plus cancellation prompt window ') if(con==true){ document.write(" Click the OK button ") }e ...