September 25, 2019
Port number of the server
sql server 1433 mysql 3306 oracle 1522
Method 2 has bean arranged in
1, the conventional configuration xml
<bean id="n1" class="com.nf.男同学" >
<property name="name" value="小明"></property>
</bean>
<Component_bean id="n1" class="com.nf.男同学" >
<property name="name" value="小明"></property>
</bean>
<respository_bean id="n1" class="com.nf.男同学" >
<property name="name" value="小明"></property>
</bean>
a. write an interface file
b. implementation class write, and implement methods
(If the third step will be deleted newspaper red)
c. In applicationcontext declare a bean (implementation class)
d. Add the declaration where it is needed, add annotations
@Autowired
private MyComponet componet;
2, notes the way
Set scan packages + @Component @Respository @Service @Controller add annotations in the bean corresponding to [] can not control
In the bean configuration in three things, temporarily it does not matter, all right with that, but in accordance with the official specification to write
[Other] [@Component @Respository dao service layer [layer]] @Service
All things can be written as Component, it can also be used as a primary key
a. write an interface file
b. implementation class write, and implement methods
c.
d. Add the declaration where it is needed, add annotations
@Autowired
private MyComponet componet;
September 26, 2019
Engineering: code a whole, cut into different places, there is no mutual coupling snippet
Distal: div + HTML + css + js + MVVM + vue.js + ui frame
The back-end (after the separation, in addition to better management, but also can be complicated by development):
1, the pom.xml dependency;
2, placeholder configuration information such as
3、@RestController(Controller+ResponseBody)
4、Model(MVC--Model层)
5, jsp (MVC - Model layer)
6, service layer (private company irreplaceable rules of the game)
High cohesion, low coupling
0 coupling, Ideals - >> >> recognized complicate ---