SpringBoot2 结构部署
1. 基本部署
2. 详细布局
2.1 config 的详细布局
3. 文件内容
3.1 application.properties
3.2 pom.xml
3.3 config 内的文件
从上向下
mybatis
package com.ykenan.ykenan.config.mybatis;
import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* MapperScan: Batch Specified Scan Mapper Package
*/
@MapperScan(basePackages = "com.ykenan.ykenan.Mapper")
@Configuration
public class MyBatisConfig {
private static final Logger logger = LoggerFactory.getLogger(MyBatisConfig.class);
/**
* Open hump nomenclature.
* @return new ConfigurationCustomizer()
*/
@Bean
public ConfigurationCustomizer configurationCustomizer() {
ConfigurationCustomizer configurationCustomizer = null;
try {
configurationCustomizer = new ConfigurationCustomizer() {
@Override
public void customize(org.apache.ibatis.session.Configuration configuration) {
configuration.setMapUnderscoreToCamelCase(true);
}
};
} catch (Exception e) {
logger.error("Exception: " + this.getClass().getName() + " MyBatisConfig");
e.printStackTrace();
}
return configurationCustomizer;
}
}
security
https://blog.csdn.net/YKenan/article/details/99696796
servlet
https://blog.csdn.net/YKenan/article/details/99689361