使用AOT;去除thymeleaf;移动前端文件路径
This commit is contained in:
parent
a7bfe1df29
commit
34f8cb73b2
43
pom.xml
43
pom.xml
@ -14,13 +14,9 @@
|
||||
<name>LionWebsite</name>
|
||||
<description>LionWebsite</description>
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<java.version>21</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
@ -28,7 +24,7 @@
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -45,7 +41,7 @@
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter-test</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<version>3.0.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@ -123,23 +119,22 @@
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.graalvm.buildtools</groupId>-->
|
||||
<!-- <artifactId>native-maven-plugin</artifactId>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <imageName>lionwebsite</imageName>-->
|
||||
<!-- <fallback>false</fallback>-->
|
||||
<!-- <verbose>true</verbose>-->
|
||||
<!-- <quickBuild>true</quickBuild>-->
|
||||
<!-- <buildArgs>-->
|
||||
<!-- <arg>-H:+ReportExceptionStackTraces</arg>-->
|
||||
<!-- <arg>--initialize-at-build-time=org.apache.commons.logging.LogFactory,org.apache.commons.logging.LogFactoryService</arg>-->
|
||||
<!-- </buildArgs>-->
|
||||
<!-- <metadataRepository>-->
|
||||
<!-- <enabled>true</enabled>-->
|
||||
<!-- </metadataRepository>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </plugin>-->
|
||||
<plugin>
|
||||
<groupId>org.graalvm.buildtools</groupId>
|
||||
<artifactId>native-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<imageName>lionwebsite</imageName>
|
||||
<buildArgs>
|
||||
<arg>--gc=G1</arg>
|
||||
<arg>-Ob</arg>
|
||||
<arg>-H:+ReportExceptionStackTraces</arg>
|
||||
<arg>--initialize-at-build-time=org.apache.commons.logging.LogFactory,org.apache.commons.logging.LogFactoryService</arg>
|
||||
</buildArgs>
|
||||
<metadataRepository>
|
||||
<enabled>true</enabled>
|
||||
</metadataRepository>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
package com.lion.lionwebsite.Configuration;
|
||||
|
||||
import com.lion.lionwebsite.Domain.*;
|
||||
import com.lion.lionwebsite.Message.*;
|
||||
import com.pengrad.telegrambot.TelegramBot;
|
||||
import com.pengrad.telegrambot.model.Chat;
|
||||
import com.pengrad.telegrambot.model.Message;
|
||||
import com.pengrad.telegrambot.model.MessageEntity;
|
||||
import com.pengrad.telegrambot.response.SendResponse;
|
||||
import com.sun.tools.javac.Main;
|
||||
import org.springframework.aot.hint.annotation.RegisterReflectionForBinding;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@ -16,7 +18,9 @@ import com.pengrad.telegrambot.model.User;
|
||||
GalleryForQuery.class, Gallery.class, GalleryTask.class, MaskDomain.class,
|
||||
PageNameCache.class, ShareFile.class, Tag.class, TagMark.class, User.class,
|
||||
SendResponse.class, Message.class, com.pengrad.telegrambot.model.User.class,
|
||||
Chat.class, MessageEntity.class})
|
||||
Chat.class, MessageEntity.class,
|
||||
AbstractMethodError.class, DeleteGalleryMessage.class, DownloadPostMessage.class, DownloadStatusMessage.class,
|
||||
GalleryPageQueryMessage.class, GalleryRequestMessage.class, IdentityMessage.class, MaintainMessage.class, ResponseMessage.class, UpdateGalleryMessage.class})
|
||||
public class CustomBean {
|
||||
|
||||
@Bean
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
package com.lion.lionwebsite.Controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
@Controller
|
||||
public class NavigationController {
|
||||
@GetMapping("/personal/")
|
||||
public String personal_index(){
|
||||
return "self";
|
||||
}
|
||||
|
||||
@GetMapping("/personal/mobile")
|
||||
public String personal_mobile(){
|
||||
return "selfMobile";
|
||||
}
|
||||
|
||||
@GetMapping("/")
|
||||
public String index(){
|
||||
return "index";
|
||||
}
|
||||
|
||||
@GetMapping("/mobile")
|
||||
public String mobile(){
|
||||
return "mobile";
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,5 +1,8 @@
|
||||
package com.lion.lionwebsite.Message;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AbstractMessage {
|
||||
|
||||
public static final byte DOWNLOAD_POST_MESSAGE = 1;
|
||||
|
||||
@ -107,6 +107,7 @@ public class CustomUtil {
|
||||
public static short _findIdlePort(){
|
||||
for(int i=20000; i<65535; i++){
|
||||
try(ServerSocket ignored = new ServerSocket(i)){
|
||||
ignored.close();
|
||||
return (short) i;
|
||||
}catch (IOException ignored) {
|
||||
}
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
<link href="/reset.css" type="text/css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Lion</title>
|
||||
<script type="module" src="/index/index.js"></script>
|
||||
<link rel="stylesheet" href="/index/index.css">
|
||||
<script type="module" src="/asserts/index/index.js"></script>
|
||||
<link rel="stylesheet" href="/asserts/index/index.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
@ -6,8 +6,8 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
|
||||
<title>Lion</title>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="module" crossorigin src="/mobile/index.js"></script>
|
||||
<link rel="stylesheet" href="/mobile/index.css">
|
||||
<script type="module" crossorigin src="/asserts/mobile/index.js"></script>
|
||||
<link rel="stylesheet" href="/asserts/mobile/index.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
@ -5,8 +5,8 @@
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Lion</title>
|
||||
<script type="module" crossorigin src="/self/index.js"></script>
|
||||
<link rel="stylesheet" href="/self/index.css">
|
||||
<script type="module" crossorigin src="/asserts/self/index.js"></script>
|
||||
<link rel="stylesheet" href="/asserts/self/index.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
Loading…
Reference in New Issue
Block a user