Skip to content

Commit 2ccefef

Browse files
committed
remix
1 parent 9565de9 commit 2ccefef

File tree

4 files changed

+58
-11
lines changed

4 files changed

+58
-11
lines changed

js-remix-sb/pom.xml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
<parent>
77
<groupId>org.springframework.boot</groupId>
88
<artifactId>spring-boot-starter-parent</artifactId>
9-
<version>2.7.18</version>
9+
<version>3.3.2</version>
10+
<!-- <version>2.7.18</version>-->
1011
<relativePath/> <!-- lookup parent from repository -->
1112
</parent>
1213

@@ -24,17 +25,27 @@
2425
<groupId>org.springframework.boot</groupId>
2526
<artifactId>spring-boot-starter-web</artifactId>
2627
</dependency>
28+
<dependency>
29+
<groupId>org.springframework.boot</groupId>
30+
<artifactId>spring-boot-starter-actuator</artifactId>
31+
</dependency>
2732
<dependency>
2833
<groupId>org.projectlombok</groupId>
2934
<artifactId>lombok</artifactId>
30-
<optional>true</optional>
35+
<!-- <scope>provided</scope>-->
36+
<!-- <version>1.18.30</version>-->
3137
</dependency>
3238
<dependency>
33-
<groupId>org.springframework.boot</groupId>
34-
<artifactId>spring-boot-devtools</artifactId>
35-
<scope>runtime</scope>
36-
<optional>true</optional>
39+
<groupId>org.webjars</groupId>
40+
<artifactId>webjars-locator-core</artifactId>
41+
<version>0.52</version>
3742
</dependency>
43+
<!-- <dependency>-->
44+
<!-- <groupId>org.springframework.boot</groupId>-->
45+
<!-- <artifactId>spring-boot-devtools</artifactId>-->
46+
<!-- <scope>runtime</scope>-->
47+
<!-- <optional>true</optional>-->
48+
<!-- </dependency>-->
3849
<dependency>
3950
<groupId>org.springframework.boot</groupId>
4051
<artifactId>spring-boot-starter-test</artifactId>
@@ -80,7 +91,8 @@
8091
</execution>
8192
<execution>
8293
<id>run-build</id>
83-
<phase>prepare-package</phase>
94+
<phase>compile</phase>
95+
<!--<phase>prepare-package</phase>-->
8496
<goals>
8597
<goal>exec</goal>
8698
</goals>
@@ -102,12 +114,16 @@
102114
<executions>
103115
<execution>
104116
<id>copy-resources</id>
105-
<phase>prepare-package</phase>
117+
<phase>none</phase>
118+
<!-- <phase>process-resources</phase>-->
119+
<!--<phase>prepare-package</phase>-->
106120
<goals>
107121
<goal>copy-resources</goal>
108122
</goals>
109123
<configuration>
110-
<outputDirectory>${basedir}/target/classes/META-INF/resources/static/</outputDirectory>
124+
<!-- <outputDirectory>${basedir}/src/main/resources/static/</outputDirectory>-->
125+
<!-- <outputDirectory>${basedir}/target/classes/META-INF/resources/static/</outputDirectory>-->
126+
<outputDirectory>${basedir}/target/classes/static/</outputDirectory>
111127
<resources>
112128
<resource>
113129
<directory>${basedir}/src/ui/build/client/</directory>

js-remix-sb/src/main/java/ie/emeraldjava/remix/RemixSpringApp.java

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package ie.emeraldjava.remix;
22

3+
import lombok.extern.slf4j.Slf4j;
4+
import org.springframework.boot.CommandLineRunner;
35
import org.springframework.boot.SpringApplication;
46
import org.springframework.boot.autoconfigure.SpringBootApplication;
57
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@@ -10,9 +12,33 @@
1012
DataSourceAutoConfiguration.class,
1113
DataSourceTransactionManagerAutoConfiguration.class,
1214
HibernateJpaAutoConfiguration.class})
13-
public class RemixSpringApp {
15+
@Slf4j
16+
public class RemixSpringApp implements CommandLineRunner { //}, WebMvcConfigurer {
1417

1518
public static void main(String[] args) {
1619
SpringApplication.run(RemixSpringApp.class, args);
1720
}
21+
22+
@Override
23+
public void run(String... args) throws Exception {
24+
log.info("RemixSpringApp");
25+
}
26+
27+
// @Controller
28+
// public class WebController {
29+
//
30+
// @GetMapping(value = "/")
31+
// public String index() {
32+
// log.info("index");
33+
// return "index.html";
34+
// }
35+
// }
36+
37+
/**
38+
* https://github.com/seanpolid/spring-react-vite-template/blob/master/src/main/java/com/demo/SpringReactViteTemplateApplication.java
39+
* @param registry
40+
*/
41+
// public void addViewControllers(ViewControllerRegistry registry) {
42+
// registry.addViewController("/").setViewName("index.html");
43+
// }
1844
}

js-remix-sb/src/ui/app/routes/_index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default function Index() {
1111
return (
1212
<div className="font-sans p-4">
1313
<h1 className="text-3xl">Welcome to Remix</h1>
14+
<h2>here</h2>
1415
<ul className="list-disc mt-4 pl-6 space-y-2">
1516
<li>
1617
<a

js-remix-sb/src/ui/vite.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,9 @@ export default defineConfig({
1313
},
1414
}),
1515
tsconfigPaths(),
16-
]
16+
],
17+
build: {
18+
outDir: './../../target/classes/statix',
19+
emptyOutDir: true
20+
}
1721
});

0 commit comments

Comments
 (0)