Skip to content

Commit bc25468

Browse files
committed
controller
1 parent ea6e131 commit bc25468

File tree

5 files changed

+29
-16
lines changed

5 files changed

+29
-16
lines changed

pom.xml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@
2929
<groupId>org.springframework.boot</groupId>
3030
<artifactId>spring-boot-starter-web</artifactId>
3131
</dependency>
32-
<dependency>
33-
<groupId>org.mybatis.spring.boot</groupId>
34-
<artifactId>mybatis-spring-boot-starter</artifactId>
35-
<version>1.3.2</version>
36-
</dependency>
3732
<dependency>
3833
<groupId>org.springframework.boot</groupId>
3934
<artifactId>spring-boot-starter-freemarker</artifactId>
@@ -72,12 +67,6 @@
7267
<artifactId>spring-boot-starter-amqp</artifactId>
7368
</dependency>
7469

75-
<dependency>
76-
<groupId>org.springframework.boot</groupId>
77-
<artifactId>spring-boot-starter-test</artifactId>
78-
<scope>test</scope>
79-
</dependency>
80-
8170
<!--常用库依赖-->
8271
<dependency>
8372
<groupId>commons-codec</groupId>
@@ -126,7 +115,7 @@
126115
<dependency>
127116
<groupId>org.mybatis.spring.boot</groupId>
128117
<artifactId>mybatis-spring-boot-starter</artifactId>
129-
<version>1.3.1</version>
118+
<version>1.3.2</version>
130119
</dependency>
131120
<!--mapper-->
132121
<!--<dependency>-->
@@ -161,6 +150,12 @@
161150
<version>1.1.10</version>
162151
</dependency>
163152

153+
<dependency>
154+
<groupId>org.springframework.boot</groupId>
155+
<artifactId>spring-boot-devtools</artifactId>
156+
<optional>true</optional>
157+
</dependency>
158+
164159
<!--代码生成器依赖-->
165160
<dependency>
166161
<groupId>org.freemarker</groupId>
@@ -181,6 +176,7 @@
181176
<artifactId>spring-boot-starter-test</artifactId>
182177
<scope>test</scope>
183178
</dependency>
179+
184180
</dependencies>
185181

186182
<build>
@@ -206,11 +202,13 @@
206202
<source>1.8</source>
207203
<target>1.8</target>
208204
<encoding>utf8</encoding>
205+
<fork>true</fork>
209206
</configuration>
210207
</plugin>
211208

212209
</plugins>
213210

211+
214212
<filters>
215213
<filter>src/main/resources/application-${filter-resource-name}.properties</filter>
216214
</filters>

src/main/java/com/yongze/project/Application.java renamed to src/main/java/com/yongze/project/ApplicationRun.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
*/
1212
@MapperScan({"com.yongze.project.dao"})
1313
@SpringBootApplication
14-
public class Application {
14+
public class ApplicationRun {
1515

1616
public static void main(String[] args) {
17-
SpringApplication.run(Application.class, args);
17+
SpringApplication.run(ApplicationRun.class, args);
1818
}
1919
}

src/main/java/com/yongze/project/controller/CityContoller.java renamed to src/main/java/com/yongze/project/controller/CityController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import org.springframework.web.bind.annotation.RestController;
66

77
@RestController
8-
public class CityContoller {
8+
public class CityController {
99

1010
@RequestMapping(value="/addCity",method= RequestMethod.GET)
1111
public boolean addCity() {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.yongze.project.controller;
2+
3+
import org.springframework.web.bind.annotation.RequestMapping;
4+
import org.springframework.web.bind.annotation.RestController;
5+
6+
@RestController
7+
@RequestMapping("/test")
8+
public class TestController {
9+
10+
@RequestMapping("/d")
11+
public String d() {
12+
System.out.println("ddd");
13+
return "test";
14+
}
15+
}

src/test/java/com/yongze/project/ApplicationTests.java renamed to src/test/java/com/yongze/project/ApplicationRunTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
@RunWith(SpringRunner.class)
1111
@SpringBootTest
12-
public class ApplicationTests {
12+
public class ApplicationRunTests {
1313

1414
@Test
1515
public void contextLoads() {

0 commit comments

Comments
 (0)