Skip to content

Commit

Permalink
消除部分warning
Browse files Browse the repository at this point in the history
  • Loading branch information
suvvm committed Nov 29, 2019
1 parent d9fb088 commit 5fc4a64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import javax.sql.DataSource;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -33,6 +34,7 @@ public DataSource druid() {
* @Return 返回监控注册的servlet对象
*/
@Bean
@SuppressWarnings("unchecked")
public ServletRegistrationBean statViewServlet() {
ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(), "/druid/*");

Expand All @@ -51,6 +53,7 @@ public ServletRegistrationBean statViewServlet() {
* @Return 返回过滤器配置对象
*/
@Bean
@SuppressWarnings("unchecked")
public FilterRegistrationBean webStatFilter() {
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
registrationBean.setFilter(new WebStatFilter());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
Expand All @@ -23,12 +22,12 @@
public class TagController {
@Autowired
private TagMapper tagMapper;

@GetMapping("/getTags")
public String getTags() {
Tag tag = new Tag();
List<Tag> tags = tagMapper.selectTagsWithoutUser(tag);
String res = JSON.toJSONString(tags);
return res;
return JSON.toJSONString(tags);
}

@PostMapping("/updateTags")
Expand All @@ -51,5 +50,5 @@ public void updateTags(@RequestParam(value = "add") String add, @RequestParam(va
for(Tag tag : mdfTags) {
tagMapper.updateTagById(tag);
}
};
}
}

0 comments on commit 5fc4a64

Please sign in to comment.