spring boot
_Rowan
顽思客,假傻子,真傻子。
展开
-
springboot全局配置文件
springboot全局配置文件application.properties//简单实例,更改端口以及context-pathserver.port=8099server.servlet.context-path=/hellobootapplication.properties文件是全局属性配置文件要自定义属性,则可在此文件中定义,并在调用的类中使用@Value注入即可@Value...原创 2020-01-20 13:27:34 · 116 阅读 · 0 评论 -
springboot配置tomcat以及1.x与2.x差异:
自定义配置Tomcat//springboot配置tomcat@Componentpublic class EmbeddedTomcatConfig implements WebServerFactoryCustomizer<ConfigurableServletWebServerFactory> { @Override public void customiz...原创 2020-01-20 13:26:56 · 469 阅读 · 0 评论 -
SpringBootApplication核心注解
SpringBootApplication核心注解1.组合注解,其注解的类表示为入口类2.在不使用其时,可使用Configuration,EnableAutoConfiguration以及ComponentScan三个注解组合@EnableAutoConfiguration使Spring Boot根据类路径中的jar包依赖为当前项目进行自动配置3.会自动扫描同级以及下级包的所有Bean(若...原创 2020-01-20 13:25:16 · 200 阅读 · 0 评论 -
springboot Banner
springboot Banner修改在资源文件resources下创建文件banner.txt在网站http://patorjk.com/software/taag 输入字符(eg:jack)并把生成的字符复制到banner.txt中再次允许即可关闭main方法改造public static void main(String[] args) { Spri...原创 2020-01-20 13:24:40 · 171 阅读 · 0 评论