Skip to content

Commit

Permalink
🎨 codestyle and livetemplate #248
Browse files Browse the repository at this point in the history
  • Loading branch information
trydofor committed Jun 1, 2024
1 parent 6ab8806 commit 32a2cef
Show file tree
Hide file tree
Showing 208 changed files with 1,640 additions and 1,576 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@Slf4j
public class AdminController {

@Setter(onMethod_ = {@Autowired})
@Setter(onMethod_ = { @Autowired })
private WarlockUserAuthnService authnService;

@PostMapping("/admin/disable-root.json")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
* @author trydofor
* @since 2019-07-11
*/
@ComponentScan({"com.moilioncircle.wings.common.controller",
"com.moilioncircle.wings.common.database",
"com.moilioncircle.wings.common.service",
"com.moilioncircle.wings.common.spring.bean"})
@ComponentScan({
"com.moilioncircle.wings.common.controller",
"com.moilioncircle.wings.common.database",
"com.moilioncircle.wings.common.service",
"com.moilioncircle.wings.common.spring.bean"
})
@ConfigurationPropertiesScan("com.moilioncircle.wings.common.spring.prop")
@AutoConfiguration
public class WinxAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public R<Jn> sleep(@RequestParam("ms") int ms, @RequestParam(value = "br", requi
}

@Operation(summary = "test speed")
@GetMapping({"/test/load/speed.html", "/index.html"})
@GetMapping({ "/test/load/speed.html", "/index.html" })
public String speed() {
return "speed";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ public static void initProject(Info info, Consumer<String> message) throws IOExc
}

final String[] copyFiles = {
".gitignore",
"pom.xml",
"winx-admin/",
"winx-api/",
"winx-common/",
"winx-devops/",
"winx-front/",
};
".gitignore",
"pom.xml",
"winx-admin/",
"winx-api/",
"winx-common/",
"winx-devops/",
"winx-front/",
};

final Predicate<String> excludes = (path) -> {
if (path.endsWith(".out")) return true;
Expand Down Expand Up @@ -192,7 +192,7 @@ private static String replaceDate999(String text) {
return text.replace("2022-02-22", ymd1)
.replace("2022_0222_01L", ymd2 + "_01L")
.replace("2022_0222_2222L", ymh + "_01L")
;
;
}

private static byte[] copyPomXml(Info info, File file) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
@ConditionalWingsEnabled(abs = TinyMailEnabledProp.Key$mvcList)
public class MailListController {

@Setter(onMethod_ = {@Autowired})
@Setter(onMethod_ = { @Autowired })
protected TinyMailListService tinyMailListService;

@Operation(summary = "list summary of all messages, in reverse order by default.")
Expand Down Expand Up @@ -78,11 +78,11 @@ public PageResult<TinyMailPlain> bySubject(@RequestBody Q<String> q, PageQuery p
}

@Operation(summary = "get mail detail", description = """
# Usage
get mail detail
## Params
* @param id - required, Mailid
""")
# Usage
get mail detail
## Params
* @param id - required, Mailid
""")
@PostMapping(value = "${" + TinyMailUrlmapProp.Key$loadDetail + "}")
@ResponseBody
public R<TinyMailPlain> loadDetail(@RequestBody Q.Id ins) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@
@ConditionalWingsEnabled(abs = TinyMailEnabledProp.Key$mvcSend)
public class MailSendController {

@Setter(onMethod_ = {@Autowired})
@Setter(onMethod_ = { @Autowired })
protected TinyMailService tinyMailService;

@Operation(summary = "Create mail and send it sync or async", description = """
# Usage
Create the mail, and auto send it in sync or async way.
## Params
* @param - request body
## Returns
* @return {200 | Result(-1)} failure
* @return {200 | Result(0)} sync send
* @return {200 | Result(mills)} async send at mills time
""")
# Usage
Create the mail, and auto send it in sync or async way.
## Params
* @param - request body
## Returns
* @return {200 | Result(-1)} failure
* @return {200 | Result(0)} sync send
* @return {200 | Result(mills)} async send at mills time
""")
@PostMapping(value = "${" + TinyMailUrlmapProp.Key$sendMail + "}")
@ResponseBody
public R<Long> sendMail(@RequestBody TinyMailPlain mail) {
Expand All @@ -45,13 +45,13 @@ public R<Long> sendMail(@RequestBody TinyMailPlain mail) {


@Operation(summary = "Save the mail only, do not send", description = """
# Usage
Save the new mail, return the id.
## Params
* @param - request body
## Returns
* @return {200 | Result(id)} mail id
""")
# Usage
Save the new mail, return the id.
## Params
* @param - request body
## Returns
* @return {200 | Result(id)} mail id
""")
@PostMapping(value = "${" + TinyMailUrlmapProp.Key$sendSave + "}")
@ResponseBody
public R<Long> sendSave(@RequestBody TinyMailPlain mail) {
Expand All @@ -61,11 +61,11 @@ public R<Long> sendSave(@RequestBody TinyMailPlain mail) {


@Operation(summary = "sync scan and resend mail async", description = """
# Usage
sync scan the mail to resend, return the count, and send them async
## Returns
* @return {200 | Result(count)} mail cou t
""")
# Usage
sync scan the mail to resend, return the count, and send them async
## Returns
* @return {200 | Result(count)} mail cou t
""")
@PostMapping(value = "${" + TinyMailUrlmapProp.Key$sendScan + "}")
@ResponseBody
public R<Integer> sendScan() {
Expand All @@ -91,13 +91,13 @@ public static class Ins {


@Operation(summary = "Sync resend failed mail", description = """
# Usage
Sync resend the failed email, return success/fail, or throw exception
## Params
* @param - request body
## Returns
* @return {200 | Result(bool)} success or not
""")
# Usage
Sync resend the failed email, return success/fail, or throw exception
## Params
* @param - request body
## Returns
* @return {200 | Result(bool)} success or not
""")
@PostMapping(value = "${" + TinyMailUrlmapProp.Key$sendRetry + "}")
@ResponseBody
public R<Boolean> sendRetry(@RequestBody Ins mail) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class MailConfigProvider {
@NotNull
private final TinyMailConfigProp configProp;

@Setter(onMethod_ = {@Autowired(required = false)})
@Setter(onMethod_ = { @Autowired(required = false) })
@Getter
private List<TinyMailConfig.Loader> configLoader = Collections.emptyList();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class MailNotice implements SmallNotice<TinyMailConfig>, InitializingBean
@NotNull @Getter
protected final MailSenderManager senderManager;

@Setter(onMethod_ = {@Autowired(required = false), @Qualifier(DEFAULT_TASK_SCHEDULER_BEAN_NAME)})
@Setter(onMethod_ = { @Autowired(required = false), @Qualifier(DEFAULT_TASK_SCHEDULER_BEAN_NAME) })
private Executor executor;

@Setter @Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public JavaMailSender defaultSender() {
public JavaMailSender singletonSender(@NotNull TinyMailConfig config) {
final String name = config.getName();
return name == null || name.isEmpty()
? defaultSender
: senders.computeIfAbsent(name, ignored -> newSender(config));
? defaultSender
: senders.computeIfAbsent(name, ignored -> newSender(config));
}

public JavaMailSender removeCaching(TinyMailConfig config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
int result = Objects.hash(
html,
from,
reply
, getHost()
, getPort()
, getUsername()
, getProtocol());
html,
from,
reply
, getHost()
, getPort()
, getUsername()
, getProtocol());
result = 31 * result + Arrays.hashCode(to);
result = 31 * result + Arrays.hashCode(cc);
result = 31 * result + Arrays.hashCode(bcc);
Expand Down
Loading

0 comments on commit 32a2cef

Please sign in to comment.