feat: complete reverse engineering, standard Maven structure, detailed code annotations and IoT-M platform architecture
This commit is contained in:
1 parent
e8dc09fb3c
commit
cd6a4c70e7
3045 files changed
+566733
-1
No files matched your search
@@ -0,0 +1,79 @@
|
||||
package com.midm.controller;
|
||||
|
||||
import java.util.Locale;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@Controller
|
||||
public class FragmentController extends BaseController {
|
||||
@RequestMapping(
|
||||
value = {"/view/**"},
|
||||
method = {RequestMethod.GET}
|
||||
)
|
||||
public String view(HttpServletRequest request, HttpServletResponse response, Authentication authentication, Model model) {
|
||||
this.init(request, response, authentication);
|
||||
model.addAttribute("theme", this.theme);
|
||||
if (authentication == null) {
|
||||
model.addAttribute("hasUser", this.userService.hasUser());
|
||||
}
|
||||
|
||||
return this.getView(authentication, request.getServletPath());
|
||||
}
|
||||
|
||||
@RequestMapping(
|
||||
value = {"/view/system/resource"},
|
||||
method = {RequestMethod.GET}
|
||||
)
|
||||
public String resourceView(HttpServletRequest request, HttpServletResponse response, Authentication authentication, Locale locale, Model model, @RequestParam String category) {
|
||||
super.init(request, response, authentication);
|
||||
model.addAttribute("category", category);
|
||||
return "template/system/resource.html";
|
||||
}
|
||||
|
||||
@RequestMapping(
|
||||
value = {"/fragment/{fragmentName}"},
|
||||
method = {RequestMethod.GET}
|
||||
)
|
||||
public String fragment(HttpServletRequest request, HttpServletResponse response, Authentication authentication, Locale locale, Model model, @PathVariable String fragmentName) {
|
||||
super.init(request, response, authentication);
|
||||
model.addAttribute("theme", this.theme);
|
||||
if (authentication == null) {
|
||||
model.addAttribute("hasUser", this.userService.hasUser());
|
||||
}
|
||||
|
||||
String var10000 = this.getView(authentication, request.getServletPath());
|
||||
return var10000 + " :: fragment";
|
||||
}
|
||||
|
||||
@RequestMapping(
|
||||
value = {"/fragment/{fragmentName}/{blockName}"},
|
||||
method = {RequestMethod.GET}
|
||||
)
|
||||
public String fragment(HttpServletRequest request, HttpServletResponse response, Authentication authentication, Locale locale, Model model, @PathVariable String fragmentName, @PathVariable String blockName) {
|
||||
super.init(request, response, authentication);
|
||||
String var10000 = this.getView(authentication, "/fragment/" + fragmentName);
|
||||
return var10000 + " :: " + blockName;
|
||||
}
|
||||
|
||||
@RequestMapping(
|
||||
value = {"/dialog/{dialogName}"},
|
||||
method = {RequestMethod.GET}
|
||||
)
|
||||
public String dialog(HttpServletRequest request, HttpServletResponse response, Authentication authentication, Locale locale, Model model, @PathVariable String dialogName, @RequestParam(required = false) String category) {
|
||||
this.init(request, response, authentication);
|
||||
model.addAttribute("theme", this.theme);
|
||||
if (authentication == null) {
|
||||
model.addAttribute("hasUser", this.userService.hasUser());
|
||||
}
|
||||
|
||||
String var10000 = this.getView(authentication, request.getServletPath());
|
||||
return var10000 + " :: dialog";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user