Skip to content

Commit

Permalink
add spring java format, spring rest docs, reformat, remove shellavail…
Browse files Browse the repository at this point in the history
…ability, upgrade to spring boot 3.0.7
  • Loading branch information
dashaun committed May 21, 2023
1 parent 9021e41 commit a5e2450
Show file tree
Hide file tree
Showing 13 changed files with 1,148 additions and 1,016 deletions.
3 changes: 3 additions & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=22.3.2.r17-grl
19 changes: 17 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.5</version>
<version>3.0.7</version>
<relativePath></relativePath>
</parent>
<groupId>dev.dashaun.shell.initializr</groupId>
Expand Down Expand Up @@ -61,6 +61,21 @@
</image>
</configuration>
</plugin>
<plugin>
<groupId>io.spring.javaformat</groupId>
<artifactId>spring-javaformat-maven-plugin</artifactId>
<version>0.0.39</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>validate</goal>
</goals>
<inherited>true</inherited>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,27 @@
@SpringBootApplication
public class Application {

public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}

static void writeStringToFile(String data, File file) throws IOException {
FileWriter fileWriter = new FileWriter(file, false);
BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
bufferedWriter.write(data);
bufferedWriter.flush();
bufferedWriter.close();
fileWriter.close();
}
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}

static void writeStringToFile(String data, File file) throws IOException {
FileWriter fileWriter = new FileWriter(file, false);
BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
bufferedWriter.write(data);
bufferedWriter.flush();
bufferedWriter.close();
fileWriter.close();
}

}

@Component
class CustomPromptProvider implements PromptProvider {

@Override
public AttributedString getPrompt() {
return new AttributedString("initializr-plusplus:>",
AttributedStyle.DEFAULT.foreground(AttributedStyle.GREEN));
}
@Override
public AttributedString getPrompt() {
return new AttributedString("initializr-plusplus:>", AttributedStyle.DEFAULT.foreground(AttributedStyle.GREEN));
}

}
Loading

0 comments on commit a5e2450

Please sign in to comment.