Tag:springboot

  • Record the spring boot experience

    Time:2019-11-22

    1. Spring boot starter web function <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> When using idea to automatically create a project, the above dependencies will be added automatically! But have you thought about it carefully? Why? Today, the driver will take you to the car to find out. Brothers, take a seat, and be careful to roll over!! […]

  • Spring boot 2.2.0 is not recommended. You are sure to encounter this problem (2)

    Time:2019-11-21

    Project recommendation: RBAC permission management system of spring cloud and spring security oauth2 welcome to pay attention to the latest version practice The last article talked about the compatibility between spring boot 2.2.0 and mybatis. Let’s take a look at this todayboom change Configurationproperties annotation use As shown in the above figure, when there are […]

  • Spring boot plus quick start

    Time:2019-11-21

    Spring boot plus quick start 1. Clone project to local git clone [email protected]:geekidea/spring-boot-plus.git Or git clone https://github.com/geekidea/spring-boot-plus.git 2. Maven construction The local environment is used by default, and the corresponding configuration file is application-local.yml mvn clean package 3. Create a new database Database mysql The default database name is: spring boot plus Import table structure […]

  • Overview of MAL architecture and functions

    Time:2019-11-20

    Spring boot actual e-commerce project Mall (20k + star) address: https://github.com/macrozheng/mall Introduction to the mall project The mall project is a set of e-commerce system, including the foreground mall system and background management system, which is implemented based on springboot + mybatis The front office mall system includes home portal, product recommendation, product search, product […]

  • Spring boot load external configuration file

    Time:2019-11-20

    Business needs: load external configuration file. It is convenient to change during deployment. First code: @SpringBootApplication public class Application { public static void main(String[] args) throws Exception { SpringApplicationBuilder springApplicationBuilder = new SpringApplicationBuilder(Application.class); springApplicationBuilder.web(true); Properties properties = getProperties(); StandardEnvironment environment = new StandardEnvironment(); environment.getPropertySources().addLast(new PropertiesPropertySource(“micro-service”, properties)); springApplicationBuilder.environment(environment); springApplicationBuilder.run(args); } private static Properties getProperties() throws IOException […]

  • Spring boot2 series (21) mybatis integration

    Time:2019-11-20

    In the previous two articles, I talked with the readers about the simplest data persistence scheme in spring boot. Although it is simple, it doesn’t use much, because it’s not as convenient as mybatis. It’s a bit complicated to integrate mybatis in Spring + spring MVC. You need to configure multiple beans, which is further […]

  • Eclipse import spring boot plus (3)

    Time:2019-11-20

    Eclipse import spring boot plus Install Lombok plug-in !!! Please make sure eclipse has the Lombok plug-in installed first!!! Download Lombok Run Lombok for installation For example, Lombok can be downloaded to: C: usersaddmindownloads Win + R open command line Go to the downloads directory cd C:\Users\Admin\Downloads Execute lombok.jar or double-click java -jar lombok.jar Select […]

  • Springboot custom business error information

    Time:2019-11-19

    Springboot custom business error information With the parameter verifier provided by Java, it is very convenient to verify business parameters. Import the following jpom files <! — stringutls tool class dependency — >         <dependency>            <groupId>org.apache.commons</groupId>            <artifactId>commons-lang3</artifactId>             <version>3.7</version>         </dependency> <! — hibernate […]

  • Spring boot plus project configuration file (4)

    Time:2019-11-19

    Spring boot plus project configuration file Profile description Configuration description The configuration file in the project mainly uses YML format Configuration file location: spring boot plussrcmainresourcesconfig Spring boot configuration is divided into public configuration: application.yml file Environment profiles in the project Application-dev.yml development environment Application-local.yml local environment Application-prod.yml generation environment Application-test.yml test environment Application uat.yml […]

  • Springboot integrate swagger

    Time:2019-11-18

    Source address:https://github.com/laolunsi/spring-boot-examples At present, springboot is often used to develop java web applications, especially the front and back separation projects. In order to facilitate communication between front and back-end developers, we introduced swagger in spring boot. Swagger works on the interface to visualize the interface data, especially for restful API This section is divided into […]

  • Detailed configuration of spring boot plus (5)

    Time:2019-11-18

    Detailed configuration of spring boot plus Public configuration application.yml 👉 official full configuration of springboot Tomcat related configuration server: servlet: context-path: /api tomcat: max-threads: 1000 min-spare-threads: 30 uri-encoding: UTF-8 Context path: project access path Max threads: Tomcat thread pool size setting Min spare threads: number of Tomcat initialization threads Uri encoding: Tomcat encoding Application related […]

  • Spring boot application deployed in external Tomcat container

    Time:2019-11-17

    0x01. overview Spring boot is usually easy to use. Even Tomcat is self integrated. We can directly write SBT startup classes, and then open the built-in Tomcat container service with one click. It’s really a good start. But considering the actual situation, our Tomcat server is generally deployed separately, with special maintenance mode. At this […]