Skip to content

Commit dc3589a

Browse files
Doha2012Eugen
authored andcommitted
fix spring-boot module (eugenp#2422)
* fix spring config * fix spring config * fix spring config * minor fix * fix spring-boot module
1 parent 127dd73 commit dc3589a

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎spring-boot/pom.xml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<scope>test</scope>
5353
</dependency>
5454

55-
<dependency>
55+
<!-- <dependency>
5656
<groupId>org.apache.tomcat.embed</groupId>
5757
<artifactId>tomcat-embed-core</artifactId>
5858
<version>${tomcat.version}</version>
@@ -62,7 +62,7 @@
6262
<groupId>org.apache.tomcat.embed</groupId>
6363
<artifactId>tomcat-embed-jasper</artifactId>
6464
<version>${tomcat.version}</version>
65-
</dependency>
65+
</dependency> -->
6666

6767
<dependency>
6868
<groupId>io.dropwizard.metrics</groupId>
@@ -253,8 +253,8 @@
253253

254254
<properties>
255255
<!-- The main class to start by executing java -jar -->
256-
<start-class>org.baeldung.boot.DemoApplication</start-class>
257-
<spring.version>4.3.4.RELEASE</spring.version>
256+
<!-- <start-class>org.baeldung.boot.DemoApplication</start-class>
257+
--> <spring.version>4.3.4.RELEASE</spring.version>
258258
<git-commit-id-plugin.version>2.2.1</git-commit-id-plugin.version>
259259
<jquery.version>3.1.1</jquery.version>
260260
<bootstrap.version>3.3.7-1</bootstrap.version>

‎spring-boot/src/main/java/com/baeldung/servlets/props/PropertySourcesLoader.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import org.springframework.core.env.ConfigurableEnvironment;
1010

1111
@Configuration
12-
@ComponentScan(basePackages = { "com.baeldung.*" })
12+
@ComponentScan(basePackages = { "com.baeldung.servlets.*" })
1313
@PropertySource("classpath:custom.properties") public class PropertySourcesLoader {
1414

1515
private static final Logger log = LoggerFactory.getLogger(PropertySourcesLoader.class);

spring-boot/src/main/java/com/baeldung/utils/Application.java renamed to spring-boot/src/main/java/com/baeldung/utils/UtilsApplication.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
@SpringBootApplication(exclude=MySQLAutoconfiguration.class)
1212
@ComponentScan(basePackages="com.baeldung.utils")
13-
public class Application {
13+
public class UtilsApplication {
1414

1515
@RolesAllowed("*")
1616
public static void main(String[] args) {
17-
SpringApplication.run(Application.class, args);
17+
SpringApplication.run(UtilsApplication.class, args);
1818
}
1919

2020
}

‎spring-boot/src/main/webapp/WEB-INF/context.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
http://www.springframework.org/schema/context
77
http://www.springframework.org/schema/context/spring-context-4.3.xsd">
88

9-
<context:component-scan base-package="com.baeldung"/>
9+
<context:component-scan base-package="com.baeldung.servlets"/>
1010

11-
<bean class="com.baeldung.configuration.WebAppInitializer"/>
11+
<bean class="com.baeldung.servlets.configuration.WebAppInitializer"/>
1212
</beans>

‎spring-boot/src/main/webapp/WEB-INF/dispatcher.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
http://www.springframework.org/schema/context
88
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
99

10-
<context:component-scan base-package="com.baeldung"/>
10+
<context:component-scan base-package="com.baeldung.servlets"/>
1111

1212
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
1313
<property name="prefix" value="/WEB-INF/jsp/"/>

0 commit comments

Comments
 (0)