记录IDEA项目构建的问题:
1.创建springbbot+mybatis+mysql+thymeleaf 的web项目
2.解决无法导入依赖包的设置
3.解决maven下载过慢问题
4.测试连接数据库
1.创建springbbot+mybatis+mysql+thymeleaf 的web项目:
一步步做就好:
然后就设置项目名称、然后就next下一步 就搞定了
2.解决无法导入依赖包的设置
建议看博主的https://blog.youkuaiyun.com/jwcxs_m/article/details/80076909
很详细整理了,感谢!!!
3.解决maven下载过慢问题
根本问题就是换一个地方下载的意思,需要我们做的就是改下载源头网址:在 .m 下的settings.xml 中自己改一下,如果很坑的你没有发现自己有这个文件 ,那么 就自己创建一个就好了,其实只是一个配置文件 让我们下载jar包有知道去哪找的一个程序所需要的文件而已。
settings.xml里的代码是这样的,直接复制粘贴,保存!!!!!!
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<!-- mirror
| Specifies a repository mirror site to use instead of a given repository. The repository that
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>uk</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://uk.maven.org/maven2/</url>
</mirror>
<mirror>
<id>CN</id>
<name>OSChina Central</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>nexus</id>
<name>internal nexus repository</name>
<!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>-->
<url>http://repo.maven.apache.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
4.测试连接数据库
1.下载mysql驱动:
**2.测试连接数据库:**自己填一下 点击测试按钮就可以测试一下 可不可以正常连接数据库了!!
后话:因为看到很多的解决的博客虽然最后解决了问题,但是 花时间理解 脑子很久饿吗,没有接触 都傻掉了,所以希望记录下来 也许可以帮到别人 不用走弯路 就好~但非常感谢广大的博主 不然肯定自己研究不来!!
好了!!!就到这里啦~~~~