mirror of
https://github.com/ityouknow/spring-boot-examples.git
synced 2026-09-03 07:27:38 +08:00
m web
This commit is contained in:
@@ -54,12 +54,12 @@
|
||||
<dependency>
|
||||
<groupId>org.webjars.bower</groupId>
|
||||
<artifactId>jquery</artifactId>
|
||||
<version>2.0.3</version>
|
||||
<version>3.6.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars.bower</groupId>
|
||||
<groupId>org.webjars.bowergithub.twbs</groupId>
|
||||
<artifactId>bootstrap</artifactId>
|
||||
<version>3.0.3</version>
|
||||
<version>5.2.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
@@ -18,4 +18,12 @@ public class HelloController {
|
||||
return "Hello World";
|
||||
}
|
||||
|
||||
@RequestMapping("/getUser")
|
||||
public User getUser() {
|
||||
User user=new User();
|
||||
user.setUserName("小明");
|
||||
user.setPassWord("xxxx");
|
||||
return user;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,8 +27,8 @@ public class UserController {
|
||||
return user;
|
||||
}
|
||||
|
||||
@RequestMapping("/getUser")
|
||||
public User getUser() {
|
||||
@RequestMapping("/getUserByName")
|
||||
public User getUserByName() {
|
||||
User user=userRepository.findByUserName("aa");
|
||||
System.out.println("若下面没出现“无缓存的时候调用”字样且能打印出数据表示测试成功");
|
||||
return user;
|
||||
|
||||
@@ -2,16 +2,15 @@ spring.datasource.url=jdbc:mysql://1.1.4.3:3306/test?serverTimezone=UTC&useUnico
|
||||
spring.datasource.username=xx
|
||||
spring.datasource.password=exxx
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
# ????????
|
||||
spring.datasource.hikari.maxLifeTime=600000
|
||||
|
||||
spring.jpa.properties.hibernate.hbm2ddl.auto=create
|
||||
spring.jpa.properties.hibernate.hbm2ddl.auto=update
|
||||
#sql\u8F93\u51FA
|
||||
spring.jpa.show-sql=true
|
||||
#format\u4E00\u4E0Bsql\u8FDB\u884C\u8F93\u51FA
|
||||
spring.jpa.properties.hibernate.format_sql=true
|
||||
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
|
||||
spring.jpa.open-in-view=false
|
||||
spring.jpa.open-in-view=true
|
||||
|
||||
com.neo.title=\u7EAF\u6D01\u7684\u5FAE\u7B11
|
||||
com.neo.description=\u5206\u4EAB\u751F\u6D3B\u548C\u6280\u672F
|
||||
Reference in New Issue
Block a user