springboot小项目总结
Posted wycbolg
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了springboot小项目总结相关的知识,希望对你有一定的参考价值。
软件:Postman、Xmind、WinScp、intelliJ idea 、navicate、swagger2接口开发工具、linux。
项目搭建:配置文件
1.注解使用@Mapper,爆红版本支持问题。找到支持@Mapper版本的依赖文件
2.springboot项目打成war包使用的几个条件:加依赖、修改启动类、打包方式<Packing>改为war:https://blog.csdn.net/qq_23934475/article/details/81776037
3.Linux上环境搭建:jdk下载、tomcat、mysql
tar -zxvf apache-tomcat-9.0.34.tar.gz mv apache-tomcat-9.0.34 tomcat cd /tomact/bin ./startup.sh service stop firewalld.service service disable firewalld.service firewall-cmd --state ./startup.sh 139.198.177.241:8080 wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz tar -xzvf mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz groupadd mysql useradd -r -g mysql mysql chown -R mysql.mysql /usr/local/mysql mkdir data yum install libaio /usr/local/mysql/bin/mysqld --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data --initialize vi /etc/my.cnf [mysqld] datadir=/usr/local/etc/mysql/data basedir=/usr/local/etc/mysql socket=/tmp/mysql.sock user=mysql port=3306 character-set-server=utf8 # 取消密码验证 skip-grant-tables # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # skip-grant-tables [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql chkconfig mysql on /usr/local/mysql/bin/mysql -uroot -p vi /etc/profile export PATH=/usr/local/etc/mysql/bin source /etc/profile mysql -u root -p
4.将war包部署到tomcat下的webapps下。
以上是关于springboot小项目总结的主要内容,如果未能解决你的问题,请参考以下文章
全栈编程系列SpringBoot整合Shiro(含KickoutSessionControlFilter并发在线人数控制以及不生效问题配置启动异常No SecurityManager...)(代码片段
SpringBoot启动报错“Consider defining a bean of type ‘xxx.mapper.UserMapper‘ in your configuration.“(代码片段