欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

spring-boot-1.5.1-disable-auto-configuration

程序员文章站 2022-05-30 14:17:57
...

spring-boot-1.5.1-disable-auto-configuration

为什么要禁用自动配置

如果启用了自动配置spring-boot启动前会进行自动扫描,非常消耗时间,拖慢了启动速度

禁用自动配置案例

创建maven工程spring-boot-1.5.1-disable-auto-configuration

https://github.com/litongjava/spring-boot-1.5.1-disable-auto-configuration

pom.xml如下

<parent>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-parent</artifactId>
  <version>1.5.1.RELEASE</version>
</parent>
<properties>
  <!-- 文件拷贝时的编码 -->
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  <!-- 编译时的编码 -->
  <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
  <!-- 定义java版本,只有继承spring-boot-starter-parent时才有效 -->
  <java.version>1.8</java.version>
</properties>
<dependencies>
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
  </dependency>
  <!-- spring-boot start -->
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
  </dependency>
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-test</artifactId>
    <scope>test</scope>
  </dependency>

  <dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-jasper</artifactId>
  </dependency>

  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jdbc</artifactId>
  </dependency>
  <!-- springboot starter data jpa -->
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
  </dependency>
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security</artifactId>
  </dependency>

  <!-- mysql-connector -->
  <dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
  </dependency>

  <!-- druid -->
  <dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>druid</artifactId>
    <version>1.1.5</version>
  </dependency>

  <dependency>
    <groupId>commons-httpclient</groupId>
    <artifactId>commons-httpclient</artifactId>
    <version>3.1</version>
  </dependency>

  <!--lombok start -->
  <dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <scope>provided</scope>
  </dependency>
  <!--lombok end -->

  <!--fastjson start -->
  <dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>fastjson</artifactId>
    <version>1.2.38</version>
  </dependency>
</dependencies>

项目目录结构

spring-boot-1.5.1-disable-auto-configuration

web:spring-boot-starter-web

security:>spring-boot-starter-security

data:spring-boot-starter-data-jpa

启动类内容如下

package com.alit.study.springboot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.AutoConfigurationExcludeFilter;
import org.springframework.boot.autoconfigure.aop.AopAutoConfiguration;
import org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration;
import org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration;
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.SecurityFilterAutoConfiguration;
import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration;
import org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
import org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration;
import org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration;
import org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration;
import org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration;
import org.springframework.boot.autoconfigure.web.HttpEncodingAutoConfiguration;
import org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration;
import org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration;
import org.springframework.boot.autoconfigure.web.ServerPropertiesAutoConfiguration;
import org.springframework.boot.autoconfigure.web.WebClientAutoConfiguration;
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration;
import org.springframework.boot.autoconfigure.websocket.WebSocketAutoConfiguration;
import org.springframework.boot.context.TypeExcludeFilter;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScan.Filter;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.context.annotation.Import;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

import lombok.extern.slf4j.Slf4j;

@Configuration
@Import({
    // web server
    EmbeddedServletContainerAutoConfiguration.class, EmbeddedServletContainerAutoConfiguration.EmbeddedTomcat.class,
    // Property
    PropertyPlaceholderAutoConfiguration.class,
    // json
    JacksonAutoConfiguration.class,
    // websocket
    WebSocketAutoConfiguration.class,
    // spring mvc
    DispatcherServletAutoConfiguration.class, ErrorMvcAutoConfiguration.class, WebMvcAutoConfiguration.class,
    // aop
    AopAutoConfiguration.class,
    // data source
    DataSourceAutoConfiguration.class,
    // JPA
    // JpaRepositoriesAutoConfiguration.class,
    // hibenate
    HibernateJpaAutoConfiguration.class,
    // jta
    JtaAutoConfiguration.class,
    //
    ConfigurationPropertiesAutoConfiguration.class,
    //
    PersistenceExceptionTranslationAutoConfiguration.class,
    //
    ValidationAutoConfiguration.class,
    //
    DataSourceTransactionManagerAutoConfiguration.class,
    //
    TransactionAutoConfiguration.class,
    //
    HttpMessageConvertersAutoConfiguration.class,
    //
    SpringDataWebAutoConfiguration.class,
    //
    ProjectInfoAutoConfiguration.class,
    //
    JdbcTemplateAutoConfiguration.class,
    //
    HttpEncodingAutoConfiguration.class,
    //
    MultipartAutoConfiguration.class,
    //
    ServerPropertiesAutoConfiguration.class,
    //
    WebClientAutoConfiguration.class,
    // spring-security
    SecurityAutoConfiguration.class, SecurityFilterAutoConfiguration.class, })

@ComponentScan(value = "com.alit.study.springboot", excludeFilters = {
    @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class),
    @Filter(type = FilterType.CUSTOM, classes = AutoConfigurationExcludeFilter.class) })

@EnableJpaRepositories(basePackages = { "com.alit.study.springboot.repository" })
@EntityScan("com.alit.study.springboot.entity")
@Slf4j
public class Application {
  public static void main(String[] args) {
    long start = System.currentTimeMillis();
    SpringApplication.run(Application.class, args);
    long end = System.currentTimeMillis();
    log.info("共使用了:" + (end - start) + "ms");
  }
}

application.properties内容如下

server.port=8080
server.context-path=/ask
spring.resources.static-locations=classpath:/ask/

logging.path=logs
logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level%logger{0}.%M:%L - %msg%n
logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level%logger{0}.%M:%L - %msg%n

spring.main.banner-mode = off

spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect

spring.datasource.url=jdbc:mysql://localhost:3306/hiberante_study?useunicode=true&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=
spring.datasource.validationQuery="select 1"
spring.datasource.type = com.alibaba.druid.pool.DruidDataSource
spring.datasource.filters = stat,wall,log4j
spring.datasource.initialSize = 1
spring.datasource.maxActive = 20
spring.datasource.maxWait = 60000
spring.datasource.minIdle = 1
spring.datasource.timeBetweenEvictionRunsMillis = 60000
spring.datasource.minEvictableIdleTimeMillis = 300000
spring.datasource.testWhileIdle = true
spring.datasource.testOnBorrow = false
spring.datasource.testOnReturn = false
spring.datasource.poolPreparedStatements = true
spring.datasource.maxOpenPreparedStatements = 20
spring.datasource.logSlowSql=true

spring.jpa.show-sql = true
spring.jpar.fromat-sql=false
spring.jpa.hibernate.ddl-auto = update
spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy

spring.devtools.restart.trigger-file:trigger.txt

实体类内容如下

package com.alit.study.springboot.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@AllArgsConstructor
@Data
@Entity
@Table(name = "ask_deny_keys")
public class AskDenyKeys {
  @Id
  @GenericGenerator(name = "system-uuid", strategy = "uuid2")
  @GeneratedValue(generator = "system-uuid")
  private String id;
  // 屏蔽关键字,关键字过滤
  @Column(nullable = false)
  private String denyKeys;
  // 屏蔽关键字显示内容
  @Column(nullable = false)
  private String responseContent;
}

dao层

package com.alit.study.springboot.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import com.alit.study.springboot.entity.AskDenyKeys;
public interface AskDenyKeysRepository extends JpaRepository<AskDenyKeys, Integer> {}

service层

package com.alit.study.springboot.service;

import java.util.List;

import com.alit.study.springboot.entity.AskDenyKeys;

public interface AskDenyService {
  public List<AskDenyKeys> findAll(int page, int rows);
  public void save(AskDenyKeys askDeny);
  public void delete(int id);
  public List<AskDenyKeys> findAll();
}
package com.alit.study.springboot.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

import com.alit.study.springboot.entity.AskDenyKeys;
import com.alit.study.springboot.repository.AskDenyKeysRepository;
import com.alit.study.springboot.service.AskDenyService;
@Service
public class AskDenyServiceImpl implements AskDenyService {

  @Autowired
  private AskDenyKeysRepository askDenyKeysDao;

  public List<AskDenyKeys> findAll(int page, int rows) {
    PageRequest pageRequest = new PageRequest(page - 1, rows);
    Page<AskDenyKeys> findAll = askDenyKeysDao.findAll(pageRequest);
    return findAll.getContent();
  }

  public List<AskDenyKeys> findAll() {
    List<AskDenyKeys> findAll = askDenyKeysDao.findAll();
    return findAll;
  }

  public void save(AskDenyKeys askDeny) {
    @SuppressWarnings("unused")
    AskDenyKeys save = askDenyKeysDao.save(askDeny);
  }

  public void delete(int id) {
    askDenyKeysDao.delete(id);
  }
}

ConfigController层

package com.alit.study.springboot.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alit.study.springboot.entity.AskDenyKeys;
import com.alit.study.springboot.repository.AskDenyKeysRepository;
import com.alit.study.springboot.service.AskDenyService;

@Controller
@RequestMapping("config")
@SuppressWarnings("all")
public class ConfigController {

  @Autowired
  private AskDenyService askDenyService;

  @Autowired
  private AskDenyKeysRepository askDenyKeysDao;

  /**
   * 返回禁止的关键字
   */
  @RequestMapping(value = "deny-keys", produces = "application/json;charset=utf-8")
  @ResponseBody
  public Map denyKeys(@RequestParam(value = "page", defaultValue = "1", required = false) int page,
      @RequestParam(value = "rows", defaultValue = "10", required = false) int rows) {
    List<AskDenyKeys> content = askDenyService.findAll(page, rows);
    Map map = new HashMap();
    map.put("total", content.size());
    map.put("rows", content);
    return map;
  }

  @RequestMapping(value = "save-deky-keys")
  @ResponseBody
  public Map saveDenyKeys(AskDenyKeys keys) {
    askDenyKeysDao.save(keys);
    Map map = new HashMap();
    map.put("success", true);
    return map;
  }
}

启动项目前需要先创建数据库,数据创建完成后,项目户自动启动,数据支持mysql和oracle

创建数据库

CREATE DATABASE hiberante_study CHARACTER SET utf8

然后启动项目,访问地址

添加

http://127.0.0.1:8080/ask/config/save-deky-keys?denyKeys=社保&responseContent=社保问题清咨询其他部门

第一次访问会提示输入用户名和密码用户名是user,密码在日志文件中

查询

http://127.0.0.1:8080/ask/config/deny-keys

项目打包

执行mvn install -DskipTest 打包,打包后spring-boot-1.5.1-disable-auto-configuration-1.0.jar有35.6M启动使用了4991ms,我对这个时间还是比较满意的

 

将自动配置类转移打其他文件中

创建类ImportAutoConfiguration.java,内容如下

package com.alit.study.springboot;

import org.springframework.boot.autoconfigure.aop.AopAutoConfiguration;
import org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration;
import org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration;
import org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration;
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.SecurityFilterAutoConfiguration;
import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration;
import org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
import org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration;
import org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration;
import org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration;
import org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration;
import org.springframework.boot.autoconfigure.web.HttpEncodingAutoConfiguration;
import org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration;
import org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration;
import org.springframework.boot.autoconfigure.web.ServerPropertiesAutoConfiguration;
import org.springframework.boot.autoconfigure.web.WebClientAutoConfiguration;
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration;
import org.springframework.boot.autoconfigure.websocket.WebSocketAutoConfiguration;
import org.springframework.context.annotation.Import;

@Import({
  // web server
  EmbeddedServletContainerAutoConfiguration.class, EmbeddedServletContainerAutoConfiguration.EmbeddedTomcat.class,
  // Property
  PropertyPlaceholderAutoConfiguration.class,
  // json
  JacksonAutoConfiguration.class,
  // websocket
  WebSocketAutoConfiguration.class,
  // spring mvc
  DispatcherServletAutoConfiguration.class, ErrorMvcAutoConfiguration.class, WebMvcAutoConfiguration.class,
  // aop
  AopAutoConfiguration.class,
  // data source
  DataSourceAutoConfiguration.class,
  // JPA
  // JpaRepositoriesAutoConfiguration.class,
  // hibenate
  HibernateJpaAutoConfiguration.class,
  // jta
  JtaAutoConfiguration.class,
  //
  ConfigurationPropertiesAutoConfiguration.class,
  //
  PersistenceExceptionTranslationAutoConfiguration.class,
  //
  ValidationAutoConfiguration.class,
  //
  DataSourceTransactionManagerAutoConfiguration.class,
  //
  TransactionAutoConfiguration.class,
  //
  HttpMessageConvertersAutoConfiguration.class,
  //
  SpringDataWebAutoConfiguration.class,
  //
  ProjectInfoAutoConfiguration.class,
  //
  JdbcTemplateAutoConfiguration.class,
  //
  HttpEncodingAutoConfiguration.class,
  //
  MultipartAutoConfiguration.class,
  //
  ServerPropertiesAutoConfiguration.class,
  //
  WebClientAutoConfiguration.class,
  // spring-security
  SecurityAutoConfiguration.class, SecurityFilterAutoConfiguration.class, })
public class ImportAutoConfiguration {}

在启动类中导入

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.AutoConfigurationExcludeFilter;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.context.TypeExcludeFilter;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScan.Filter;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.context.annotation.Import;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

import lombok.extern.slf4j.Slf4j;

@Configuration
@Import(com.alit.study.springboot.ImportAutoConfiguration.class)
@ComponentScan(value = "com.alit.study.springboot", excludeFilters = {
    @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class),
    @Filter(type = FilterType.CUSTOM, classes = AutoConfigurationExcludeFilter.class) })

@EnableJpaRepositories(basePackages = { "com.alit.study.springboot.repository" })
@EntityScan("com.alit.study.springboot.entity")
@Slf4j
public class Application {
  public static void main(String[] args) {
    long start = System.currentTimeMillis();
    SpringApplication.run(Application.class, args);
    long end = System.currentTimeMillis();
    log.info("共使用了:" + (end - start) + "ms");
  }
}

启动成功的日志

09:40:20.961 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Included patterns for restart : []
09:40:20.963 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Excluded patterns for restart : [/spring-boot-starter/target/classes/, /spring-boot-autoconfigure/target/classes/, /spring-boot-starter-[\w-]+/, /spring-boot/target/classes/, /spring-boot-actuator/target/classes/, /spring-boot-devtools/target/classes/]
09:40:20.964 [main] DEBUG org.springframework.boot.devtools.restart.ChangeableUrls - Matching URLs for reloading : [file:/D:/dev_workspace/java/hg_project/spring-boot-1.5.1-disable-auto-configuration/target/classes/]
2019-11-25 09:40:21.250 INFO Application.logStarting:48 - Starting Application on WIN-3VS4MLAM4P5 with PID 6208 (D:\dev_workspace\java\hg_project\spring-boot-1.5.1-disable-auto-configuration\target\classes started by Administrator in D:\dev_workspace\java\hg_project\spring-boot-1.5.1-disable-auto-configuration)
2019-11-25 09:40:21.251 INFO Application.logStartupProfileInfo:637 - No active profile set, falling back to default profiles: default
2019-11-25 09:40:21.303 INFO AnnotationConfigEmbeddedWebApplicationContext.prepareRefresh:582 - Refreshing org.springframework.bootaaa@qq.com39bff50d: startup date [Mon Nov 25 09:40:21 CST 2019]; root of context hierarchy
2019-11-25 09:40:22.284 INFO PostProcessorRegistrationDelegate$BeanPostProcessorChecker.postProcessAfterInitialization:325 - Bean 'org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration' of type [class org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-25 09:40:22.352 INFO PostProcessorRegistrationDelegate$BeanPostProcessorChecker.postProcessAfterInitialization:325 - Bean 'validator' of type [class org.springframework.validation.beanvalidation.LocalValidatorFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-25 09:40:22.389 INFO PostProcessorRegistrationDelegate$BeanPostProcessorChecker.postProcessAfterInitialization:325 - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$77c0f63c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-25 09:40:23.149 INFO TomcatEmbeddedServletContainer.initialize:89 - Tomcat initialized with port(s): 8080 (http)
2019-11-25 09:40:23.163 INFO StandardService.log:179 - Starting service Tomcat
2019-11-25 09:40:23.164 INFO StandardEngine.log:179 - Starting Servlet Engine: Apache Tomcat/8.5.11
2019-11-25 09:40:23.406 INFO TldScanner.log:179 - At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2019-11-25 09:40:23.409 INFO [/ask].log:179 - Initializing Spring embedded WebApplicationContext
2019-11-25 09:40:23.409 INFO ContextLoader.prepareEmbeddedWebApplicationContext:276 - Root WebApplicationContext: initialization completed in 2108 ms
2019-11-25 09:40:23.568 INFO FilterRegistrationBean.configure:258 - Mapping filter: 'characterEncodingFilter' to: [/*]
2019-11-25 09:40:23.568 INFO FilterRegistrationBean.configure:258 - Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-11-25 09:40:23.568 INFO FilterRegistrationBean.configure:258 - Mapping filter: 'httpPutFormContentFilter' to: [/*]
2019-11-25 09:40:23.568 INFO FilterRegistrationBean.configure:258 - Mapping filter: 'requestContextFilter' to: [/*]
2019-11-25 09:40:23.570 INFO DelegatingFilterProxyRegistrationBean.configure:258 - Mapping filter: 'springSecurityFilterChain' to: [/*]
2019-11-25 09:40:23.570 INFO ServletRegistrationBean.onStartup:190 - Mapping servlet: 'dispatcherServlet' to [/]
2019-11-25 09:40:23.767 INFO DruidDataSource.init:932 - {dataSource-1} inited
2019-11-25 09:40:23.990 INFO LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory:349 - Building JPA container EntityManagerFactory for persistence unit 'default'
2019-11-25 09:40:24.008 INFO LogHelper.logPersistenceUnitInformation:31 - HHH000204: Processing PersistenceUnitInfo [
	name: default
	...]
2019-11-25 09:40:24.101 INFO Version.logVersion:37 - HHH000412: Hibernate Core {5.0.11.Final}
2019-11-25 09:40:24.104 INFO Environment.<clinit>:213 - HHH000206: hibernate.properties not found
2019-11-25 09:40:24.106 INFO Environment.buildBytecodeProvider:317 - HHH000021: Bytecode provider name : javassist
2019-11-25 09:40:24.151 INFO Version.<clinit>:66 - HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2019-11-25 09:40:24.346 INFO Dialect.<init>:156 - HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2019-11-25 09:40:24.713 INFO SchemaUpdate.execute:105 - HHH000228: Running hbm2ddl schema update
2019-11-25 09:40:24.784 INFO LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory:382 - Initialized JPA EntityManagerFactory for persistence unit 'default'
2019-11-25 09:40:25.197 INFO RequestMappingHandlerAdapter.initControllerAdviceCache:534 - Looking for @ControllerAdvice: org.springframework.bootaaa@qq.com39bff50d: startup date [Mon Nov 25 09:40:21 CST 2019]; root of context hierarchy
2019-11-25 09:40:25.271 INFO RequestMappingHandlerMapping.register:543 - Mapped "{[/config/deny-keys],produces=[application/json;charset=utf-8]}" onto public java.util.Map com.alit.study.springboot.controller.ConfigController.denyKeys(int,int)
2019-11-25 09:40:25.272 INFO RequestMappingHandlerMapping.register:543 - Mapped "{[/config/save-deky-keys]}" onto public java.util.Map com.alit.study.springboot.controller.ConfigController.saveDenyKeys(com.alit.study.springboot.entity.AskDenyKeys)
2019-11-25 09:40:25.273 INFO RequestMappingHandlerMapping.register:543 - Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2019-11-25 09:40:25.274 INFO RequestMappingHandlerMapping.register:543 - Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2019-11-25 09:40:25.305 INFO SimpleUrlHandlerMapping.registerHandler:354 - Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-11-25 09:40:25.305 INFO SimpleUrlHandlerMapping.registerHandler:354 - Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-11-25 09:40:25.346 INFO SimpleUrlHandlerMapping.registerHandler:354 - Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-11-25 09:40:25.621 INFO AuthenticationManagerConfiguration.configure:173 - 

Using default security password: 0e9e7126-d62b-49f1-8724-91f28bcb00d9

2019-11-25 09:40:25.666 INFO DefaultSecurityFilterChain.<init>:43 - Creating filter chain: OrRequestMatcher [requestMatchers=[Ant [pattern='/css/**'], Ant [pattern='/js/**'], Ant [pattern='/images/**'], Ant [pattern='/webjars/**'], Ant [pattern='/**/favicon.ico'], Ant [pattern='/error']]], []
2019-11-25 09:40:25.734 INFO DefaultSecurityFilterChain.<init>:43 - Creating filter chain: OrRequestMatcher [requestMatchers=[Ant [pattern='/**']]], [org.springframework.secuaaa@qq.com3ac397f0, org.springaaa@qq.com61231cee, aaa@qq.com4c7, org.aaa@qq.com4088487f, org.springframaaa@qq.com5d70449a, org.spaaa@qq.comb27172a, org.springframework.aaa@qq.com3d03edd2, org.springframaaa@qq.com7266b31a, oaaa@qq.com7480492d, orgaaa@qq.com72f17791, org.springfraaa@qq.com3f685051]
2019-11-25 09:40:25.862 INFO TomcatEmbeddedServletContainer.start:192 - Tomcat started on port(s): 8080 (http)
2019-11-25 09:40:25.867 INFO Application.logStarted:57 - Started Application in 4.89 seconds (JVM running for 5.296)
2019-11-25 09:40:25.867 INFO Application.main:30 - 共使用了:4898ms