Use config.setAllowedOriginPatterns("*") instead of config.setAllowedOrigins(Collections.singletonList("*"));
2022/07/03
2022/06/29
CONDITIONS EVALUATION REPORT
logging.level.org.springframework.boot.autoconfigure=ERROR
What is username and password when starting Spring Boot with Tomcat?
user name: user
password:
2022-06-29 17:17:09.586 WARN 1242 --- [ main] .s.s.UserDetailsServiceAutoConfiguration :
Using generated security password: 7b324ed9-1181-461e-bd5e-0a26ebdd3013
This generated password is for development use only. Your security configuration must be updated before running your application in production.
2017/05/07
exec-maven-plugin java angular
pomファイルに下記を追加:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<mainClass>com.example.DemoApplication</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<workingDirectory>${project.basedir}/src/main/angular</workingDirectory>
<executable>ng.cmd</executable>
<arguments>
<argument>build</argument>
<argument>--watch</argument>
<argument>--output-path=${project.basedir}/src/main/resources/static</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
IDEのdebug configurationのmaven goadsに
exec:exec
を記載してangular buildを実行する
exec:javaでspringを実行する
うまくいきました!!
次はangularのhot swapping ね!!
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<mainClass>com.example.DemoApplication</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<workingDirectory>${project.basedir}/src/main/angular</workingDirectory>
<executable>ng.cmd</executable>
<arguments>
<argument>build</argument>
<argument>--watch</argument>
<argument>--output-path=${project.basedir}/src/main/resources/static</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
IDEのdebug configurationのmaven goadsに
exec:exec
を記載してangular buildを実行する
exec:javaでspringを実行する
うまくいきました!!
次はangularのhot swapping ね!!
2017/05/06
spring-boot:run does not stop the tomcat
eclipseでmvn spring-boot:run を停止して、tomcatがまだ生きる
the port has been usedになる。
↓
The best way to "fix" that is to not do it. Why would you need to run a maven goal from eclipse when you can just right click in the main class and
boot dashboardも回避できる。
=> boot dashboardの仕組みは?単純に実行したことを思えたかな?
あとで調べる
the port has been usedになる。
↓
The best way to "fix" that is to not do it. Why would you need to run a maven goal from eclipse when you can just right click in the main class and
Run As->Java Application?boot dashboardも回避できる。
=> boot dashboardの仕組みは?単純に実行したことを思えたかな?
あとで調べる
spring-boot hot swapping にする
・pomフィアルに下記を追記する
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
・IDEの自動ビルドを有効にする
他に、devtoolsはcacheを無効にしている。
properties.put("server.jsp-servlet.init-parameters.development", "true");
また、
By default, any entry on the classpath that points to a folder will be monitored for changes. Note that certain resources such as static assets and view templates do not need to restart the application.
HERE:
https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html#using-boot-devtools-restart-exclude
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
・IDEの自動ビルドを有効にする
他に、devtoolsはcacheを無効にしている。
| properties.put("spring.thymeleaf.cache", "false"); |
| properties.put("spring.freemarker.cache", "false"); |
| properties.put("spring.groovy.template.cache", "false"); |
| properties.put("spring.mustache.cache", "false"); |
| properties.put("server.session.persistent", "true"); |
| properties.put("spring.h2.console.enabled", "true"); |
| properties.put("spring.resources.cache-period", "0"); |
| properties.put("spring.resources.chain.cache", "false"); |
| properties.put("spring.template.provider.cache", "false"); |
| properties.put("spring.mvc.log-resolved-exception", "true"); |
また、
By default, any entry on the classpath that points to a folder will be monitored for changes. Note that certain resources such as static assets and view templates do not need to restart the application.
HERE:
https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html#using-boot-devtools-restart-exclude