美文网首页
springboot

springboot

作者: 别叫我小新 | 来源:发表于2018-10-11 22:39 被阅读0次

在何时间任保证只有同一个对象在操作他synchronzied
阿里数据库连接池源码都是lock
即时聊天工具 现在都用nio
hashMap底层原理
jdk动态代理实现过程,源码解析
连接池空闲,设置等待时间,等待时间超过了就去掉
jar main方法启动
不能相差超过一个packeg
springboot 不建议用jsp页面
Druid 连接数据库
postman 测试接口

Druid连接数据库
导包

<!-- https://mvnrepository.com/artifact/com.alibaba/druid -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.1.11</version>
        </dependency>

还有一定要设置这个,在target里面生成xml文件
在pom的build里面设置

        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>

            </resource>
        </resources>

image.png

在controller层不要写@Controller了
要换成@RestController
获取id的方式


image.png

相关文章

网友评论

      本文标题:springboot

      本文链接:https://www.haomeiwen.com/subject/psmvaftx.html