Tag:spring

  • Struts 2 + Spring + Hibernate paging code [more] page 1 / 7

    Time:2021-9-18

    Dao layer interface:Java code Copy codeThe code is as follows: package com.last999.im.news.dao; import java.util.*; import com.last999.im.news.entity.KindEntity; import com.last999.im.news.web.PageTool; public interface KindEntityDao{ public KindEntity get(String uuid); public void save(KindEntity kindEntity); public void update(KindEntity kindEntity); public void delete(String uuid); public void delete(KindEntity kindEntity); public List<KindEntity> findAll(); public KindEntity findKindEntityByName(String name); public List<KindEntity> getKindEntity(PageTool pageInfo); public int getRows(); […]

  • How to process HTTP responses using spring responseentity

    Time:2021-9-10

    brief introduction When using spring, there are usually many ways to achieve the same goal, and the same is true for handling HTTP responses. In this article, we learn how to set the corresponding content, status and header information of HTTP through responseentity. ResponseEntity Responseentity identifies the entire http: status code, header information and corresponding […]

  • Spring boot integrates Shiro + JWT to separate the front and back ends

    Time:2021-8-20

    This example shares the specific code of spring boot integration Shiro + JWT to separate the front and back ends for your reference. The specific contents are as follows There is little content here. Many of them are posted code. I have read the source code and commented on the post. The post doesn’t use […]

  • The example explains in detail that springboot + nginx realizes the resource upload function

    Time:2021-8-15

    Recently, Xiaobian is learning to use nginx to place static resources, such as pictures, videos, CSS / JS, etc. Let’s record a wave of learning dry goods. 1. Nginx installation and configuration The server used by Xiaobian is alicloud’s lightweight application server, and the system uses Ubuntu. Note: remember to open the 9090 TCP port. […]

  • Explanation of spring @ conditional annotation and detailed explanation of examples

    Time:2021-8-11

    preface: @Conditional is a new annotation provided by spring 4. It is used to judge according to certain conditions and register beans to the container if the conditions are met. @Definition of conditional: //This annotation can be annotated on classes and methods @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Conditional { Class<? extends Condition>[] value(); } […]

  • Detailed explanation of spring boot microservice custom starter principle

    Time:2021-8-10

    This article mainly introduces the principle of spring boot microservice custom starter in detail. It is introduced in great detail through the example code, which has a certain reference value for everyone’s study or work. Friends in need can refer to it After using spring boot to develop microservices, the number of projects has greatly […]

  • Implementation of conditional assembly bean in spring boot

    Time:2021-8-9

    Conditional assembly Starting from spring framework 3.1, it is allowed to add precondition judgment during bean assembly. What is conditional assembly Condition judgment before bean assembly. For example, @ profile (introduced in spring 3.1) and @ conttemporary (introduced in spring 4.0)Implementation mode: annotation mode and programming mode. Suppose we now have a small demand for […]

  • Spring actual container postprocessor operation example

    Time:2021-8-6

    This article describes the container post processor of spring. Share with you for your reference, as follows: One configuration file <?xml version=”1.0″ encoding=”GBK”?> <beans xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://www.springframework.org/schema/beans” xmlns:p=”http://www.springframework.org/schema/p” xsi:schemaLocation=”http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd”> <!– Configure two simple bean instances — > <bean/> <bean Init method = “init” P: name = “Monkey King” P: Axe ref = “SteelAxe” / > […]

  • Usage example of property placeholder configurator in spring practice

    Time:2021-8-2

    This article describes the usage of property placeholder configurator in spring practice. Share with you for your reference, as follows: One configuration file <?xml version=”1.0″ encoding=”GBK”?> <beans xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://www.springframework.org/schema/beans” xmlns:p=”http://www.springframework.org/schema/p” xsi:schemaLocation=”http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd”> <!– Propertyplaceholderconfigurer is a container post processor that reads Property file information and set this information to the data of the spring configuration […]

  • Process diagram of spring cloud building Eureka

    Time:2021-7-30

    This article mainly introduces the process diagram of spring cloud building Eureka. It is introduced in great detail through the example code, which has certain reference value for everyone’s study or work. Friends in need can refer to it Establishment of Eureka server Eureka is the registry of spring cloud, which provides the functions of […]

  • Spring cloud calls code instances between multiple microservices

    Time:2021-7-27

    This article mainly introduces the calling code examples between multiple microservices in spring cloud. The example code is introduced in great detail, which has certain reference value for everyone’s study or work. Friends in need can refer to it Now there is another student micro service user and school micro service school. What should we […]

  • Examples of using spring AOP in Web Application

    Time:2021-7-22

    preface In the past, AOP was notified by creating proxy classes manually. However, in daily development, we are not willing to hard code these proxy classes. We prefer to use Di and IOC to manage AOP proxy classes. Spring provides us with the following ways to use the AOP framework 1、 Configure AOP declaratively (that […]